}
self.damageforcescale = 2;
self.death_time = 0;
- self.alpha = 0;
self.scale = 0;
self.fade_time = 0;
self.pain_frame = 0;
return;
}
- if (self.owner.effects & CSQCMODEL_EF_INVISIBLE)
+ if (self.owner.alpha < 0)
{
self.owner.killindicator = world;
remove(self);
void ChatBubbleThink()
{
self.nextthink = time;
- if ((self.owner.effects & CSQCMODEL_EF_INVISIBLE) || self.owner.chatbubbleentity != self)
+ if ((self.owner.alpha < 0) || self.owner.chatbubbleentity != self)
{
if(self.owner) // but why can that ever be world?
self.owner.chatbubbleentity = world;
void UpdateChatBubble()
{
- if (self.effects & CSQCMODEL_EF_INVISIBLE)
+ if (self.alpha < 0)
return;
// spawn a chatbubble entity if needed
if (!self.chatbubbleentity)
.float oldcolormap;
void respawn(void)
{
- if(!(self.effects & CSQCMODEL_EF_INVISIBLE) && autocvar_g_respawn_ghosts)
+ if(self.alpha >= 0 && autocvar_g_respawn_ghosts)
{
self.solid = SOLID_NOT;
self.takedamage = DAMAGE_NO;
self.effects &~= (EF_RED | EF_BLUE | EF_ADDITIVE | EF_FULLBRIGHT | EF_FLAME | EF_NODEPTHTEST);
- if((self.effects & CSQCMODEL_EF_INVISIBLE) || self.deadflag) // don't apply the flags if the player is gibbed
+ if(self.alpha < 0 || self.deadflag) // don't apply the flags if the player is gibbed
return;
Fire_ApplyDamage(self);
self.dmg_take = self.dmg_take + take;//max(take - 10, 0);
self.dmg_inflictor = inflictor;
- if (self.health <= -autocvar_sv_gibhealth && !(self.effects & CSQCMODEL_EF_INVISIBLE))
+ if (self.health <= -autocvar_sv_gibhealth && self.alpha >= 0)
{
// don't use any animations as a gib
self.frame = 0;
self.view_ofs = '0 0 4';
Violence_GibSplash(self, 1, 1, attacker);
- self.effects |= CSQCMODEL_EF_INVISIBLE;
+ self.alpha = -1;
self.solid = SOLID_NOT; // restore later
}
}
if(!g_freezetag)
{
// become fully visible
- self.alpha = 1;
+ self.alpha = default_player_alpha;
// throw a weapon
SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.switchweapon);
}