self.crouch = false;
self.revival_time = 0;
- setorigin (self, (spot.origin + PL_VIEW_OFS)); // offset it so that the spectator spawns higher off the ground, looks better this way
+ setorigin (self, (spot.origin + STAT(PL_VIEW_OFS, NULL))); // offset it so that the spectator spawns higher off the ground, looks better this way
self.prevorigin = self.origin;
self.items = 0;
self.weapons = '0 0 0';
setmodel(self, MDL_Null);
self.drawonlytoclient = self;
- setsize (self, PL_CROUCH_MIN, PL_CROUCH_MAX); // give the spectator some space between walls for MOVETYPE_FLY_WORLDONLY
+ setsize (self, STAT(PL_CROUCH_MIN, NULL), STAT(PL_CROUCH_MAX, NULL)); // give the spectator some space between walls for MOVETYPE_FLY_WORLDONLY
self.view_ofs = '0 0 0'; // so that your view doesn't go into the ceiling with MOVETYPE_FLY_WORLDONLY, previously "PL_VIEW_OFS"
PS(self).m_weapon = WEP_Null;
this.drawonlytoclient = NULL;
this.crouch = false;
- this.view_ofs = PL_VIEW_OFS;
- setsize(this, PL_MIN, PL_MAX);
+ this.view_ofs = STAT(PL_VIEW_OFS, NULL);
+ setsize(this, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL));
this.spawnorigin = spot.origin;
setorigin(this, spot.origin + '0 0 1' * (1 - this.mins.z - 24));
// don't reset back to last position, even if new position is stuck in solid
if(!self.killindicator)
{
- if(self.deadflag == DEAD_NO)
+ if(!IS_DEAD(self))
{
killtime = max(killtime, self.clientkill_nexttime - time);
self.clientkill_nexttime = time + killtime + autocvar_g_balance_kill_antispam;
}
- if(killtime <= 0 || !IS_PLAYER(self) || self.deadflag != DEAD_NO)
+ if(killtime <= 0 || !IS_PLAYER(self) || IS_DEAD(self))
{
ClientKill_Now();
}
bool SpectateNext()
{SELFPARAM();
- other = find(self.enemy, classname, "player");
+ other = find(self.enemy, classname, STR_PLAYER);
if (MUTATOR_CALLHOOK(SpectateNext, self, other))
other = spec_player;
else if (!other)
- other = find(other, classname, "player");
+ other = find(other, classname, STR_PLAYER);
if(other) { SetSpectatee(self, other); }
bool SpectatePrev()
{SELFPARAM();
// NOTE: chain order is from the highest to the lower entnum (unlike find)
- other = findchain(classname, "player");
+ other = findchain(classname, STR_PLAYER);
if (!other) // no player
return false;
void ShowRespawnCountdown()
{SELFPARAM();
float number;
- if(self.deadflag == DEAD_NO) // just respawned?
+ if(!IS_DEAD(self)) // just respawned?
return;
else
{
else if(autocvar_g_vehicles_enter)
{
if(!self.frozen)
- if(self.deadflag == DEAD_NO)
+ if(!IS_DEAD(self))
if(!gameover)
{
entity head, closest_target = world;
while(head) // find the closest acceptable target to enter
{
if(head.vehicle_flags & VHF_ISVEHICLE)
- if(head.deadflag == DEAD_NO)
+ if(!IS_DEAD(head))
if(!head.owner || ((head.vehicle_flags & VHF_MULTISLOT) && SAME_TEAM(head.owner, self)))
if(head.takedamage != DAMAGE_NO)
{
if(!gameover)
if(!self.frozen)
if(!self.vehicle)
- if(self.deadflag == DEAD_NO)
+ if(!IS_DEAD(self))
{
entity veh;
for(veh = world; (veh = findflags(veh, vehicle_flags, VHF_ISVEHICLE)); )
if(vlen(veh.origin - self.origin) < autocvar_g_vehicles_enter_radius)
- if(veh.deadflag == DEAD_NO)
+ if(!IS_DEAD(veh))
if(veh.takedamage != DAMAGE_NO)
if((veh.vehicle_flags & VHF_MULTISLOT) && SAME_TEAM(veh.owner, self))
Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_VEHICLE_ENTER_GUNNER);
player_powerups();
}
- if (self.deadflag != DEAD_NO)
+ if (IS_DEAD(self))
{
if(self.personal && g_race_qualifying)
{
void DrownPlayer(entity this)
{
- if(this.deadflag != DEAD_NO)
+ if(IS_DEAD(this))
return;
if (this.waterlevel != WATERLEVEL_SUBMERGED)