const float SP_KH_LOSSES = 9;
void kh_ScoreRules(float teams)
{
- ScoreRules_basics(teams, SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, TRUE);
+ ScoreRules_basics(teams, SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, true);
ScoreInfo_SetLabel_TeamScore( ST_KH_CAPS, "caps", SFL_SORT_PRIO_SECONDARY);
ScoreInfo_SetLabel_PlayerScore(SP_KH_CAPS, "caps", SFL_SORT_PRIO_SECONDARY);
ScoreInfo_SetLabel_PlayerScore(SP_KH_PUSHES, "pushes", 0);
{
if(!IS_PLAYER(e) || self.team != e.team)
if(!kh_tracking_enabled)
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
float kh_Key_waypointsprite_visible_for_player(entity e) // ??
{
if(!kh_tracking_enabled)
- return FALSE;
+ return false;
if(!self.owner)
- return TRUE;
+ return true;
if(!self.owner.owner)
- return TRUE;
- return FALSE; // draw only when key is not owned
+ return true;
+ return false; // draw only when key is not owned
}
void kh_update_state()
kh_interferemsg_time = 0;
entity key;
- kh_no_radar_circles = TRUE;
+ kh_no_radar_circles = true;
FOR_EACH_KH_KEY(key)
kh_Key_Remove(key);
- kh_no_radar_circles = FALSE;
+ kh_no_radar_circles = false;
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);
nades_GiveBonus(key.owner, autocvar_g_nades_bonus_score_high);
}
- first = TRUE;
+ first = true;
string keyowner = "";
FOR_EACH_KH_KEY(key)
if(key.owner.kh_next == key)
if(!first)
keyowner = strcat(keyowner, ", ");
keyowner = key.owner.netname;
- first = FALSE;
+ first = false;
}
Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_NUM_4(teem, INFO_KEYHUNT_CAPTURE_), keyowner);
- first = TRUE;
+ first = true;
midpoint = '0 0 0';
firstorigin = '0 0 0';
lastorigin = '0 0 0';
lastorigin = thisorigin;
if(first)
firstorigin = thisorigin;
- first = FALSE;
+ first = false;
}
if(kh_teams > 2)
{
Send_Notification(NOTIF_ONE, initial_owner, MSG_CENTER, APP_TEAM_NUM_4(initial_owner.team, CENTER_KEYHUNT_START_));
- WaypointSprite_Spawn("key-dropped", 0, 0, key, '0 0 1' * KH_KEY_WP_ZSHIFT, world, key.team, key, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAG, '0 1 1');
+ WaypointSprite_Spawn("key-dropped", 0, 0, key, '0 0 1' * KH_KEY_WP_ZSHIFT, world, key.team, key, waypointsprite_attachedforcarrier, false, RADARICON_FLAG, '0 1 1');
key.waypointsprite_attachedforcarrier.waypointsprite_visible_for_player = kh_Key_waypointsprite_visible_for_player;
kh_Key_AssignTo(key, initial_owner);
kh_Key_AssignTo(key, world);
makevectors(player.v_angle);
- key.velocity = W_CalculateProjectileVelocity(player.velocity, autocvar_g_balance_keyhunt_throwvelocity * v_forward, FALSE);
+ key.velocity = W_CalculateProjectileVelocity(player.velocity, autocvar_g_balance_keyhunt_throwvelocity * v_forward, false);
key.pusher = world;
key.pushltime = time + autocvar_g_balance_keyhunt_protecttime;
key.kh_dropperteam = key.team;
Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_4(key, INFO_KEYHUNT_LOST_), player.netname);
kh_Key_AssignTo(key, world);
makevectors('-1 0 0' * (45 + 45 * random()) + '0 360 0' * random());
- key.velocity = W_CalculateProjectileVelocity(player.velocity, autocvar_g_balance_keyhunt_dropvelocity * v_forward, FALSE);
+ key.velocity = W_CalculateProjectileVelocity(player.velocity, autocvar_g_balance_keyhunt_dropvelocity * v_forward, false);
key.pusher = mypusher;
key.pushltime = time + autocvar_g_balance_keyhunt_protecttime;
if(suicide)
Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_KEYHUNT);
Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_KEYHUNT_OTHER);
- kh_tracking_enabled = TRUE;
+ kh_tracking_enabled = true;
}
void kh_StartRound() // runs at the start of each round
kh_Key_Spawn(my_player, 360 * i / kh_teams, i);
}
- kh_tracking_enabled = FALSE;
+ kh_tracking_enabled = false;
Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_KEYHUNT_SCAN, autocvar_g_balance_keyhunt_delay_tracking);
kh_Controller_SetThink(autocvar_g_balance_keyhunt_delay_tracking, kh_EnableTrackingDevice);
}
MUTATOR_HOOKFUNCTION(kh_Key_DropAll)
{
- kh_Key_DropAll(self, TRUE);
+ kh_Key_DropAll(self, true);
return 0;
}
MUTATOR_HOOKFUNCTION(kh_PlayerDies)
{
if(self == other)
- kh_Key_DropAll(self, TRUE);
+ kh_Key_DropAll(self, true);
else if(IS_PLAYER(other))
- kh_Key_DropAll(self, FALSE);
+ kh_Key_DropAll(self, false);
else
- kh_Key_DropAll(self, TRUE);
+ kh_Key_DropAll(self, true);
return 0;
}