From 3c04f2bda5285f6d9a05843a3a161b19bef0fdf5 Mon Sep 17 00:00:00 2001 From: Nathan TIEN YOU Date: Thu, 3 Feb 2022 22:25:22 +0100 Subject: [PATCH] fix bug when decoy gets destroyed while phasing --- mod/scripts/vscripts/weapons/mp_ability_holopilot.nut | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/scripts/vscripts/weapons/mp_ability_holopilot.nut b/mod/scripts/vscripts/weapons/mp_ability_holopilot.nut index 38ac7f2..408c870 100644 --- a/mod/scripts/vscripts/weapons/mp_ability_holopilot.nut +++ b/mod/scripts/vscripts/weapons/mp_ability_holopilot.nut @@ -396,7 +396,7 @@ void function PlayerUsesHoloRewindThreaded( entity player, entity decoy ) { player.EndSignal( "OnDestroy" ) player.EndSignal( "OnDeath" ) - + decoy.EndSignal("OnDestroy") entity mover = CreateScriptMover( player.GetOrigin(), player.GetAngles() ) player.SetParent( mover, "REF" ) @@ -428,7 +428,7 @@ void function PlayerUsesHoloRewindThreaded( entity player, entity decoy ) { initial_origin -= (initial_origin-decoy.GetOrigin())*(1/i) initial_angle -= (initial_angle-decoy.GetAngles())*(1/i) - + if(!IsAlive(decoy)) mover.NonPhysicsMoveTo( initial_origin, PHASE_REWIND_PATH_SNAPSHOT_INTERVAL, 0, 0 ) mover.NonPhysicsRotateTo( initial_angle, PHASE_REWIND_PATH_SNAPSHOT_INTERVAL, 0, 0 ) wait PHASE_REWIND_PATH_SNAPSHOT_INTERVAL