void Ice_Think()
{SELFPARAM();
- if(!self.owner.frozen || self.owner.iceblock != self)
+ if(!STAT(FROZEN, self.owner) || self.owner.iceblock != self)
{
remove(self);
return;
if(!IS_PLAYER(targ) && !IS_MONSTER(targ)) // only specified entities can be freezed
return;
- if(targ.frozen)
+ if(STAT(FROZEN, targ))
return;
float targ_maxhealth = ((IS_MONSTER(targ)) ? targ.max_health : start_health);
- targ.frozen = frozen_type;
+ STAT(FROZEN, targ) = frozen_type;
targ.revive_progress = ((frozen_type == 3) ? 1 : 0);
targ.health = ((frozen_type == 3) ? targ_maxhealth : 1);
targ.revive_speed = freeze_time;
void Unfreeze (entity targ)
{
- if(!targ.frozen)
+ if(!STAT(FROZEN, targ))
return;
- if(targ.frozen && targ.frozen != 3) // only reset health if target was frozen
+ if(STAT(FROZEN, targ) && STAT(FROZEN, targ) != 3) // only reset health if target was frozen
targ.health = ((IS_PLAYER(targ)) ? start_health : targ.max_health);
- targ.frozen = 0;
+ STAT(FROZEN, targ) = 0;
targ.revive_progress = 0;
targ.revival_time = time;
self.bot_attack = true;
mirrordamage = frag_mirrordamage;
force = frag_force;
- if(targ.frozen)
+ if(STAT(FROZEN, targ))
if(deathtype != DEATH_HURTTRIGGER.m_id && deathtype != DEATH_TEAMCHANGE.m_id && deathtype != DEATH_AUTOTEAMCHANGE.m_id)
{
if(autocvar_g_frozen_revive_falldamage > 0)
force *= autocvar_g_frozen_force;
}
- if(targ.frozen && deathtype == DEATH_HURTTRIGGER.m_id && !autocvar_g_frozen_damage_trigger)
+ if(STAT(FROZEN, targ) && deathtype == DEATH_HURTTRIGGER.m_id && !autocvar_g_frozen_damage_trigger)
{
Send_Effect(EFFECT_TELEPORT, targ.origin, '0 0 0', 1);
if(IS_PLAYER(victim) || (IS_TURRET(victim) && victim.active == ACTIVE_ACTIVE) || IS_MONSTER(victim) || MUTATOR_CALLHOOK(PlayHitsound, victim))
{
- if(DIFF_TEAM(victim, attacker) && !victim.frozen)
+ if(DIFF_TEAM(victim, attacker) && !STAT(FROZEN, victim))
{
if(damage > 0)
{
e.fire_endtime = 0;
// ice stops fire
- if(e.frozen)
+ if(STAT(FROZEN, e))
e.fire_endtime = 0;
t = min(frametime, e.fire_endtime - time);
e.fire_hitsound = true;
if(!IS_INDEPENDENT_PLAYER(e))
- if(!e.frozen)
+ if(!STAT(FROZEN, e))
FOREACH_CLIENT(IS_PLAYER(it) && it != e, LAMBDA(
if(!IS_DEAD(it))
if(!IS_INDEPENDENT_PLAYER(it))