]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Small cleanup
authorterencehill <piuntn@gmail.com>
Sat, 10 Sep 2016 11:22:29 +0000 (13:22 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 10 Sep 2016 11:22:29 +0000 (13:22 +0200)
qcsrc/server/mutators/mutator/gamemode_keyhunt.qc
qcsrc/server/mutators/mutator/gamemode_keyhunt.qh

index 5a0bca6e83947820b8fd55125498519144ec7bfd..96d2c541dadb6ecb66fd8f8a96bf12d610d3c7a9 100644 (file)
@@ -40,7 +40,7 @@ const vector KH_KEY_MIN = '-10 -10 -46';
 const vector KH_KEY_MAX = '10 10 3';
 const float KH_KEY_BRIGHTNESS = 2;
 
-float kh_no_radar_circles;
+bool kh_no_radar_circles;
 
 // kh_state
 //     bits  0- 4: team of key 1, or 0 for no such key, or 30 for dropped, or 31 for self
@@ -81,6 +81,8 @@ float kh_interferemsg_time, kh_interferemsg_team;
 
 float kh_key_dropped, kh_key_carried;
 
+int kh_Key_AllOwnedByWhichTeam();
+
 const float ST_KH_CAPS = 1;
 void kh_ScoreRules(int teams)
 {
@@ -782,14 +784,11 @@ void kh_Key_Spawn(entity initial_owner, float _angle, float i)  // runs every ti
 }
 
 // -1 when no team completely owns all keys yet
-float kh_Key_AllOwnedByWhichTeam()  // constantly called. check to see if all the keys are owned by the same team
+int kh_Key_AllOwnedByWhichTeam()  // constantly called. check to see if all the keys are owned by the same team
 {
        entity key;
-       float teem;
-       float keys;
-
-       teem = -1;
-       keys = NumTeams(kh_teams);
+       int teem = -1;
+       int keys = NumTeams(kh_teams);
        FOR_EACH_KH_KEY(key)
        {
                if(!key.owner)
index 9a98df98fda007eee44fc3e982da116b8a3584d2..d0fb5f95bc2ff0c455a96da9900932b586e75e8f 100644 (file)
@@ -42,9 +42,8 @@ REGISTER_MUTATOR(kh, false)
 // ALL OF THESE should be removed in the future, as other code should not have to care
 
 // used by bots:
-float kh_tracking_enabled;
+bool kh_tracking_enabled;
 .entity kh_next;
-float kh_Key_AllOwnedByWhichTeam();
 
 USING(kh_Think_t, void());
 void kh_StartRound();