From: terencehill Date: Thu, 20 Aug 2015 23:42:00 +0000 (+0200) Subject: Properly set bot_attack field in a few more situations X-Git-Tag: xonotic-v0.8.2~1891^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ac71b99a405a4103f6cd2b16a45e0e2263a0377d;p=xonotic%2Fxonotic-data.pk3dir.git Properly set bot_attack field in a few more situations --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index aa02de5b0..4a7c12bff 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -202,6 +202,7 @@ void PutObserverInServer (void) } self.frags = FRAGS_SPECTATOR; + self.bot_attack = false; MUTATOR_CALLHOOK(MakePlayerObserver); diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index a20d35220..9f2ead80f 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -566,6 +566,7 @@ void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypo targ.revive_progress = ((frozen_type == 3) ? 1 : 0); targ.health = ((frozen_type == 3) ? targ_maxhealth : 1); targ.revive_speed = freeze_time; + self.bot_attack = false; entity ice, head; ice = spawn(); @@ -601,6 +602,9 @@ void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypo void Unfreeze (entity targ) { + if(!targ.frozen) + return; + if(targ.frozen && targ.frozen != 3) // only reset health if target was frozen targ.health = ((IS_PLAYER(targ)) ? start_health : targ.max_health); @@ -608,6 +612,7 @@ void Unfreeze (entity targ) targ.frozen = 0; targ.revive_progress = 0; targ.revival_time = time; + self.bot_attack = true; WaypointSprite_Kill(targ.waypointsprite_attached);