X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_damage.qc;h=2cc773b73f526b53a46b927692be1ba1069d9970;hb=5607e279fe7b0dc9f92e15556ed6dc33f17f549c;hp=b5d87eed172cb27eafd02cec6d4af64a6dfd440e;hpb=59b6575d5306d671853a67e37aa795f45315562b;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index b5d87eed1..2cc773b73 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -560,6 +560,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(); @@ -591,6 +592,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); @@ -598,6 +602,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);