PROJECTILE_TOUCH;
if(attacker.team != other.team || autocvar_g_nexball_basketball_teamsteal)
- if((ball = other.ballcarried) && !STAT(FROZEN, other) && !other.deadflag && (IS_PLAYER(attacker)))
+ if((ball = other.ballcarried) && !STAT(FROZEN, other) && !IS_DEAD(other) && (IS_PLAYER(attacker)))
{
other.velocity = other.velocity + normalize(self.velocity) * other.damageforcescale * autocvar_g_balance_nexball_secondary_force;
UNSET_ONGROUND(other);
void Monster_Anim()
{SELFPARAM();
int deadbits = (self.anim_state & (ANIMSTATE_DEAD1 | ANIMSTATE_DEAD2));
- if(self.deadflag)
+ if(IS_DEAD(self))
{
if (!deadbits)
{
if(!IS_PLAYER(self))
return; // not a player
- if(self.deadflag || gameover)
+ if(IS_DEAD(self) || gameover)
instagib_stop_countdown(self);
else if (self.ammo_cells > 0 || (self.items & IT_UNLIMITED_WEAPON_AMMO) || (self.flags & FL_GODMODE))
instagib_stop_countdown(self);
if(!(other.flags & FL_PICKUPITEMS)
|| STAT(FROZEN, other)
- || other.deadflag
+ || IS_DEAD(other)
|| (this.solid != SOLID_TRIGGER)
|| (this.owner == other)
|| (time < this.item_spawnshieldtime)
if (other.iscreature)
{
if (other.takedamage)
- if (!other.deadflag)
+ if (!IS_DEAD(other))
if (other.triggerhealtime < time)
{
EXACTTRIGGER_TOUCH;
if(trace_ent)
if(trace_ent.movetype)
if(trace_ent.takedamage)
- if(!trace_ent.deadflag)
+ if(!IS_DEAD(trace_ent) && !STAT(FROZEN, trace_ent))
{
if(DIFF_TEAM(trace_ent, gunner))
{
if(autocvar_g_vehicle_bumblebee_healgun_locktime)
{
- if(vehic.tur_head.lock_time < time || vehic.tur_head.enemy.deadflag)
+ if(vehic.tur_head.lock_time < time || IS_DEAD(vehic.tur_head.enemy) || STAT(FROZEN, vehic.tur_head.enemy))
vehic.tur_head.enemy = world;
if(trace_ent)
if(trace_ent.movetype)
if(trace_ent.takedamage)
- if(!trace_ent.deadflag)
+ if(!IS_DEAD(trace_ent) && !STAT(FROZEN, trace_ent))
{
if(teamplay)
{
// Target lock & predict
if(autocvar_g_vehicle_raptor_cannon_locktarget == 2)
{
- if(raptor.gun1.lock_time < time || raptor.gun1.enemy.deadflag)
+ if(raptor.gun1.lock_time < time || IS_DEAD(raptor.gun1.enemy) || STAT(FROZEN, raptor.gun1.enemy))
raptor.gun1.enemy = world;
if(trace_ent)
if(trace_ent.movetype)
if(trace_ent.takedamage)
- if(!trace_ent.deadflag)
+ if(!IS_DEAD(trace_ent) && !STAT(FROZEN, trace_ent))
{
if(teamplay)
{
}
// if dead, just wait until we can respawn
- if (self.deadflag)
+ if (IS_DEAD(self))
{
if (self.deadflag == DEAD_DEAD)
{
self.mdl = "";
- if ( !self.owner.deadflag && IS_PLAYER(self.owner) )
+ if ( !IS_DEAD(self.owner) && IS_PLAYER(self.owner) )
{
if ( self.owner.active_minigame )
self.mdl = "models/sprites/minigame_busy.iqm";
// add a way to see what the items were BEFORE all of these checks for the mutator hook
int items_prev = self.items;
- if((self.items & IT_USING_JETPACK) && !self.deadflag && !gameover)
+ if((self.items & IT_USING_JETPACK) && !IS_DEAD(self) && !gameover)
self.modelflags |= MF_ROCKET;
else
self.modelflags &= ~MF_ROCKET;
self.effects &= ~(EF_RED | EF_BLUE | EF_ADDITIVE | EF_FULLBRIGHT | EF_FLAME | EF_NODEPTHTEST);
- if((self.alpha < 0 || self.deadflag) && !self.vehicle) // don't apply the flags if the player is gibbed
+ if((self.alpha < 0 || IS_DEAD(self)) && !self.vehicle) // don't apply the flags if the player is gibbed
return;
Fire_ApplyDamage(self);
void player_anim ()
{SELFPARAM();
int deadbits = (self.anim_state & (ANIMSTATE_DEAD1 | ANIMSTATE_DEAD2));
- if(self.deadflag) {
+ if(IS_DEAD(self)) {
if (!deadbits) {
// Decide on which death animation to use.
if(random() < 0.5)
// count the damage
if(attacker)
- if(!targ.deadflag)
+ if(!IS_DEAD(targ))
if(deathtype != DEATH_BUFF.m_id)
if(targ.takedamage == DAMAGE_AIM)
if(targ != attacker)
if(IS_PLAYER(e))
{
- if(e.deadflag)
+ if(IS_DEAD(e))
return -1;
}
else
MUTATOR_HOOKFUNCTION(ft, HavocBot_ChooseRole)
{SELFPARAM();
- if (!self.deadflag)
+ if (!IS_DEAD(self))
{
if (random() < 0.5)
self.havocbot_role = havocbot_role_ft_freeing;
if(!this.hook.state)
{
float dm = vlen(this.oldvelocity) - velocity_len; // dm is now the velocity DECREASE. Velocity INCREASE should never cause a sound or any damage.
- if (this.deadflag)
+ if (IS_DEAD(this))
dm = (dm - autocvar_g_balance_falldamage_deadminspeed) * autocvar_g_balance_falldamage_factor;
else
dm = min((dm - autocvar_g_balance_falldamage_minspeed) * autocvar_g_balance_falldamage_factor, autocvar_g_balance_falldamage_maxdamage);