X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_damage.qc;h=840ffe5c5d4a98315ebaf608ffe4cd03a817e928;hp=b5d87eed172cb27eafd02cec6d4af64a6dfd440e;hb=6b8490ff79ca48220bd0023b5da4019d1bfdcd7d;hpb=fa9b4da73e5a48423237dfc709700fc0a206f024 diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index b5d87eed17..840ffe5c5d 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -10,7 +10,7 @@ #include "weapons/accuracy.qh" #include "weapons/csqcprojectile.qh" #include "weapons/selection.qh" -#include "../common/buffs.qh" +#include "../common/buffs/all.qh" #include "../common/constants.qh" #include "../common/deathtypes.qh" #include "../common/notifications.qh" @@ -265,7 +265,8 @@ float Obituary_WeaponDeath( if(death_weapon) { w_deathtype = deathtype; - int death_message = WEP_ACTION(death_weapon, ((murder) ? WR_KILLMESSAGE : WR_SUICIDEMESSAGE)); + Weapon w = get_weaponinfo(death_weapon); + int death_message = ((murder) ? w.wr_killmessage : w.wr_suicidemessage)(w); w_deathtype = false; if (death_message) @@ -560,6 +561,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 +593,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 +603,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);