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
|
||||
if (Alias ~= "MoveForward" || Alias ~= "MoveBackward" || Alias ~= "TurnLeft" || Alias ~= "TurnRight"
|
||||
|| Alias ~= "StrafeLeft" || Alias ~= "StrafeRight" || Alias ~= "Axis")
|
||||
// Open trader on movement if it's a pre-game
|
||||
if (NicePackMutator.bIsPreGame && NicePackMutator.bInitialTrader && (NicePackMutator.bStillDuringInitTrader || !nicePlayer.bOpenedInitTrader) && nicePlayer.Pawn != none)
|
||||
{
|
||||
// Open trader if it's a pre-game
|
||||
if (NicePackMutator.bIsPreGame && NicePackMutator.bInitialTrader && (NicePackMutator.bStillDuringInitTrader || !nicePlayer.bOpenedInitTrader) && nicePlayer.Pawn != none)
|
||||
{
|
||||
nicePlayer.ShowBuyMenu("Initial trader", KFHumanPawn(nicePlayer.Pawn).MaxCarryWeight);
|
||||
nicePlayer.bOpenedInitTrader = true;
|
||||
return true;
|
||||
}
|
||||
// nicePlayer.ClientOpenMenu("NicePack.NiceGUIBuyMenu",,"Test stuff",string(15));
|
||||
if (Alias ~= "MoveForward" || Alias ~= "MoveBackward" || Alias ~= "TurnLeft" || Alias ~= "TurnRight"
|
||||
|| Alias ~= "StrafeLeft" || Alias ~= "StrafeRight" || Alias ~= "Axis")
|
||||
{
|
||||
// nicePlayer.ClientOpenMenu("NicePack.NiceGUIBuyMenu",,"Test stuff",string(15));
|
||||
nicePlayer.ShowBuyMenu("Initial trader", KFHumanPawn(nicePlayer.Pawn).MaxCarryWeight);
|
||||
nicePlayer.bOpenedInitTrader = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Reload if we've detected a reload alias in this button's command
|
||||
if (niceWeap != none && !nicePlayer.bUseServerReload &&
|
||||
(bNeedsReload || Alias ~= "ReloadMeNow" || Alias ~= "ReloadWeapon"))
|
||||
niceWeap.ClientReloadMeNow();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user