use doors (triggers/movers) during initial wave

This commit is contained in:
Shtoyan 2022-07-19 20:06:01 +04:00
parent 46216c87f4
commit a8793a950c

View File

@ -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;
}