From: terencehill Date: Sat, 10 Sep 2016 11:22:29 +0000 (+0200) Subject: Small cleanup X-Git-Tag: xonotic-v0.8.2~607 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8377697c8b9ee067de875dd7b2fef275aa183f56;p=xonotic%2Fxonotic-data.pk3dir.git Small cleanup --- diff --git a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc index 5a0bca6e8..96d2c541d 100644 --- a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc +++ b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc @@ -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) diff --git a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qh b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qh index 9a98df98f..d0fb5f95b 100644 --- a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qh +++ b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qh @@ -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();