From a8793a950cb4aac1ff14f8e9f3d03ec4cd77dc20 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Tue, 19 Jul 2022 20:06:01 +0400 Subject: [PATCH] use doors (triggers/movers) during initial wave --- sources/NicePlayerController.uc | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/sources/NicePlayerController.uc b/sources/NicePlayerController.uc index 4c56f7b..8909aec 100644 --- a/sources/NicePlayerController.uc +++ b/sources/NicePlayerController.uc @@ -601,23 +601,32 @@ simulated function ClientLog(String logStr){ if(bFlagDebug) Log("NiceDebug:"$logStr); } -function ServerUse(){ + +function ServerUse() +{ local NiceHumanPawn myPawn; + myPawn = NiceHumanPawn(Pawn); - if(myPawn == none){ + if (myPawn == none) + { super.ServerUse(); return; } + // Handle initial shop / medic drugs - if(NicePackMutator != none && NicePackMutator.bIsPreGame && NicePackMutator.bInitialTrader){ - if(VSize(Pawn.Velocity) <= 0.0){ + if (NicePackMutator != none && NicePackMutator.bIsPreGame && NicePackMutator.bInitialTrader) + { + if (VSize(Pawn.Velocity) <= 0.0) + { ShowBuyMenu("Initial trader", myPawn.MaxCarryWeight); bOpenedInitTrader = true; } } - else - super.ServerUse(); + + // call this anyways, so we can use doors! + super.ServerUse(); } + simulated function ClientUpdatePawnMaxHealth(NiceHumanPawn updatePawn, int newHealthMax){ updatePawn.HealthMax = newHealthMax; }