+#include "gamemode_keyhunt.qh"
#ifndef GAMEMODE_KEYHUNT_H
#define GAMEMODE_KEYHUNT_H
if(vlen(key.owner.origin - p) > autocvar_g_balance_keyhunt_maxdist)
goto not_winning;
kh_WinnerTeam(self.team);
-:not_winning
+LABEL(not_winning)
}
if(kh_interferemsg_time && time > kh_interferemsg_time)
float t_team = kh_Team_ByID(num);
float players = 0;
FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(
- if(!IS_DEAD(it) && !it.BUTTON_CHAT && it.team == t_team)
+ if(!IS_DEAD(it) && !PHYS_INPUT_BUTTON_CHAT(it) && it.team == t_team)
++players;
));
if(KH_READY_TEAMS_OK())
{
if(prev_missing_teams_mask > 0)
- Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_MISSING_TEAMS);
+ Kill_Notification(NOTIF_ALL, world, MSG_CENTER, CPID_MISSING_TEAMS);
prev_missing_teams_mask = -1;
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);
if(player_count == 0)
{
if(prev_missing_teams_mask > 0)
- Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_MISSING_TEAMS);
+ Kill_Notification(NOTIF_ALL, world, MSG_CENTER, CPID_MISSING_TEAMS);
prev_missing_teams_mask = -1;
}
else
void kh_EnableTrackingDevice() // runs after each round
{
- Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_KEYHUNT);
- Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_KEYHUNT_OTHER);
+ Kill_Notification(NOTIF_ALL, world, MSG_CENTER, CPID_KEYHUNT);
+ Kill_Notification(NOTIF_ALL, world, MSG_CENTER, CPID_KEYHUNT_OTHER);
kh_tracking_enabled = true;
}
return;
}
- Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_KEYHUNT);
- Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_KEYHUNT_OTHER);
+ Kill_Notification(NOTIF_ALL, world, MSG_CENTER, CPID_KEYHUNT);
+ Kill_Notification(NOTIF_ALL, world, MSG_CENTER, CPID_KEYHUNT_OTHER);
for(i = 0; i < kh_teams; ++i)
{
players = 0;
entity my_player = world;
FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(
- if(!IS_DEAD(it) && !it.BUTTON_CHAT && it.team == teem)
+ if(!IS_DEAD(it) && !PHYS_INPUT_BUTTON_CHAT(it) && it.team == teem)
{
++players;
if(random() * players <= 1)
MUTATOR_HOOKFUNCTION(kh, HavocBot_ChooseRole)
{
+ SELFPARAM();
if(IS_DEAD(self))
return true;