float kh_KeyCarrier_waypointsprite_visible_for_player(entity e) // runs all the time
{
- if(e.classname != "player" || self.team != e.team)
+ if(!IS_PLAYER(e) || self.team != e.team)
if(!kh_tracking_enabled)
return FALSE;
if(vlen(force) <= 0)
return;
if(time > self.pushltime)
- if(attacker.classname == "player")
+ if(IS_PLAYER(attacker))
self.team = attacker.team;
}
// maybe start a shorter countdown?
}
- if(other.classname != "player")
+ if not(IS_PLAYER(other))
return;
if(other.deadflag != DEAD_NO)
return;
kh_Key_Remove(key);
kh_no_radar_circles = FALSE;
- Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_ARENA_ROUNDSTART, autocvar_g_balance_keyhunt_delay_round);
+ Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_KEYHUNT_ROUNDSTART, autocvar_g_balance_keyhunt_delay_round);
kh_Controller_SetThink(autocvar_g_balance_keyhunt_delay_round, kh_StartRound);
}
attacker = world;
if(lostkey.pusher)
if(lostkey.pusher.team != teem)
- if(lostkey.pusher.classname == "player")
+ if(IS_PLAYER(lostkey.pusher))
attacker = lostkey.pusher;
players = keys = 0;
float p1 = kh_CheckPlayers(0), p2 = kh_CheckPlayers(1), p3 = kh_CheckPlayers(2), p4 = kh_CheckPlayers(3);
if not(p1 || p2 || p3 || p4)
{
- Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_ARENA_ROUNDSTART, autocvar_g_balance_keyhunt_delay_round);
+ Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_KEYHUNT_ROUNDSTART, autocvar_g_balance_keyhunt_delay_round);
kh_Controller_SetThink(autocvar_g_balance_keyhunt_delay_round, kh_StartRound);
}
else
{
if(self == other)
kh_Key_DropAll(self, TRUE);
- else if(other.classname == "player")
+ else if(IS_PLAYER(other))
kh_Key_DropAll(self, FALSE);
else
kh_Key_DropAll(self, TRUE);