better input handling during initial trader
This commit is contained in:
parent
a8793a950c
commit
1944c5bd94
@ -482,23 +482,24 @@ function bool KeyEvent(EInputKey Key, EInputAction Action, float Delta)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Open trader on movement
|
// Open trader on movement if it's a pre-game
|
||||||
|
if (NicePackMutator.bIsPreGame && NicePackMutator.bInitialTrader && (NicePackMutator.bStillDuringInitTrader || !nicePlayer.bOpenedInitTrader) && nicePlayer.Pawn != none)
|
||||||
|
{
|
||||||
if (Alias ~= "MoveForward" || Alias ~= "MoveBackward" || Alias ~= "TurnLeft" || Alias ~= "TurnRight"
|
if (Alias ~= "MoveForward" || Alias ~= "MoveBackward" || Alias ~= "TurnLeft" || Alias ~= "TurnRight"
|
||||||
|| Alias ~= "StrafeLeft" || Alias ~= "StrafeRight" || Alias ~= "Axis")
|
|| Alias ~= "StrafeLeft" || Alias ~= "StrafeRight" || Alias ~= "Axis")
|
||||||
{
|
{
|
||||||
// Open trader if it's a pre-game
|
// nicePlayer.ClientOpenMenu("NicePack.NiceGUIBuyMenu",,"Test stuff",string(15));
|
||||||
if (NicePackMutator.bIsPreGame && NicePackMutator.bInitialTrader && (NicePackMutator.bStillDuringInitTrader || !nicePlayer.bOpenedInitTrader) && nicePlayer.Pawn != none)
|
|
||||||
{
|
|
||||||
nicePlayer.ShowBuyMenu("Initial trader", KFHumanPawn(nicePlayer.Pawn).MaxCarryWeight);
|
nicePlayer.ShowBuyMenu("Initial trader", KFHumanPawn(nicePlayer.Pawn).MaxCarryWeight);
|
||||||
nicePlayer.bOpenedInitTrader = true;
|
nicePlayer.bOpenedInitTrader = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// nicePlayer.ClientOpenMenu("NicePack.NiceGUIBuyMenu",,"Test stuff",string(15));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reload if we've detected a reload alias in this button's command
|
// Reload if we've detected a reload alias in this button's command
|
||||||
if (niceWeap != none && !nicePlayer.bUseServerReload &&
|
if (niceWeap != none && !nicePlayer.bUseServerReload &&
|
||||||
(bNeedsReload || Alias ~= "ReloadMeNow" || Alias ~= "ReloadWeapon"))
|
(bNeedsReload || Alias ~= "ReloadMeNow" || Alias ~= "ReloadWeapon"))
|
||||||
niceWeap.ClientReloadMeNow();
|
niceWeap.ClientReloadMeNow();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user