]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/gamemode_keyhunt.qc
Unify boolean constants
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / gamemode_keyhunt.qc
index ae7f66c5908ee701c31a086c0c896f303698d060..6ae1f8b5b1388b9c8b2b9cfbb9294397638c141f 100644 (file)
@@ -76,7 +76,7 @@ const float SP_KH_KCKILLS = 8;
 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);
@@ -91,20 +91,20 @@ float kh_KeyCarrier_waypointsprite_visible_for_player(entity e)  // runs all the
 {
        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()
@@ -494,10 +494,10 @@ void kh_FinishRound()  // runs when a team captures the keys
        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);
@@ -523,7 +523,7 @@ void kh_WinnerTeam(float teem)  // runs when a team wins // Samual: Teem?.... TE
                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)
@@ -531,12 +531,12 @@ void kh_WinnerTeam(float teem)  // runs when a team wins // Samual: Teem?.... TE
                        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';
@@ -553,7 +553,7 @@ void kh_WinnerTeam(float teem)  // runs when a team wins // Samual: Teem?.... TE
                lastorigin = thisorigin;
                if(first)
                        firstorigin = thisorigin;
-               first = FALSE;
+               first = false;
        }
        if(kh_teams > 2)
        {
@@ -769,7 +769,7 @@ void kh_Key_Spawn(entity initial_owner, float angle, float i)  // runs every tim
 
        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);
@@ -814,7 +814,7 @@ void kh_Key_DropOne(entity key)
 
        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;
@@ -839,7 +839,7 @@ void kh_Key_DropAll(entity player, float suicide) // runs whenever a player dies
                        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)
@@ -893,7 +893,7 @@ 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);
 
-       kh_tracking_enabled = TRUE;
+       kh_tracking_enabled = true;
 }
 
 void kh_StartRound()  // runs at the start of each round
@@ -935,7 +935,7 @@ 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);
 }
@@ -1025,18 +1025,18 @@ void kh_finalize()
 
 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;
 }