From 02e703b0a2d854316aaa5d2987510f061552fb9c Mon Sep 17 00:00:00 2001 From: Nathan TIEN YOU Date: Fri, 4 Feb 2022 12:24:48 +0100 Subject: [PATCH] fix holopilot nova --- mod/scripts/vscripts/weapons/mp_ability_holopilot.nut | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mod/scripts/vscripts/weapons/mp_ability_holopilot.nut b/mod/scripts/vscripts/weapons/mp_ability_holopilot.nut index 15e930f..dd33864 100644 --- a/mod/scripts/vscripts/weapons/mp_ability_holopilot.nut +++ b/mod/scripts/vscripts/weapons/mp_ability_holopilot.nut @@ -170,9 +170,10 @@ entity function CreateHoloPilotDecoys( entity player, int numberOfDecoysToMake = if ( setOriginAndAngles ) stickPercentToRun = 0.0 + entity decoy for( int i = 0; i < numberOfDecoysToMake; ++i ) { - entity decoy = player.CreatePlayerDecoy( stickPercentToRun ) + decoy = player.CreatePlayerDecoy( stickPercentToRun ) decoy.SetMaxHealth( 50 ) decoy.SetHealth( 50 ) decoy.EnableAttackableByAI( 50, 0, AI_AP_FLAG_NONE ) @@ -197,9 +198,11 @@ entity function CreateHoloPilotDecoys( entity player, int numberOfDecoysToMake = #if MP thread MonitorDecoyActiveForPlayer( decoy, player ) #endif - return decoy } + if(numberOfDecoysToMake == 1){ + return decoy + } #if BATTLECHATTER_ENABLED PlayBattleChatterLine( player, "bc_pHolo" ) #endif