From 2c015fb9e741d5b54a363d05c4c89300e1643911 Mon Sep 17 00:00:00 2001 From: INeedBots Date: Tue, 19 Jan 2021 13:30:29 -0600 Subject: [PATCH] fix scr error --- userraw/maps/mp/bots/_bot_script.gsc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/userraw/maps/mp/bots/_bot_script.gsc b/userraw/maps/mp/bots/_bot_script.gsc index cf23202..e7f77ad 100644 --- a/userraw/maps/mp/bots/_bot_script.gsc +++ b/userraw/maps/mp/bots/_bot_script.gsc @@ -1500,6 +1500,9 @@ bot_inc_bots(obj, unreach) { level endon("game_ended"); self endon("bot_inc_bots"); + + if (!isDefined(obj)) + return; if (!isDefined(obj.bots)) obj.bots = 0; @@ -3182,6 +3185,8 @@ bot_revenge_think() if(!isDefined(self.killerLocation)) return; + loc = self.killerLocation; + for(;;) { wait( RandomIntRange( 1, 5 ) ); @@ -3192,7 +3197,7 @@ bot_revenge_think() if ( randomint( 100 ) < 75 ) return; - self SetScriptGoal( self.killerLocation, 64 ); + self SetScriptGoal( loc, 64 ); if (self waittill_any_return( "goal", "bad_path", "new_goal" ) != "new_goal") self ClearScriptGoal();