skip scrn code in CanBuyNow()

This commit is contained in:
Shtoyan 2022-02-24 15:18:05 +04:00
parent e4b2f73969
commit 79b9151c66

View File

@ -491,15 +491,17 @@ simulated function ClientChangeWeapon(NiceWeapon newWeap){
// Validate that client is not hacking. // Validate that client is not hacking.
function bool CanBuyNow() function bool CanBuyNow()
{ {
local NicePlayerController niceController; local NiceGameType NiceGT;
niceController = NicePlayerController(Controller); NiceGT = NiceGameType(Level.Game);
if (niceController == none) if (NicePlayerController(Controller) == none)
return false; return false;
if (NiceGameType(Level.Game) != none && NiceGameType(Level.Game).NicePackMutator != none if (NiceGT != none && NiceGT.NicePackMutator != none
&& NiceGameType(Level.Game).NicePackMutator.bIsPreGame) && NiceGT.NicePackMutator.bIsPreGame)
return true; return true;
return Super.CanBuyNow();
// skip Scrn code!
return super(KFPawn).CanBuyNow();
} }
// Overridden to not modify dual pistols' weapon group // Overridden to not modify dual pistols' weapon group