]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Get rid of an array that's actually not used. Add 2 comments to explain a small diffe...
authorterencehill <piuntn@gmail.com>
Wed, 5 Sep 2018 19:43:02 +0000 (21:43 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 5 Sep 2018 19:43:02 +0000 (21:43 +0200)
qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc
qcsrc/server/bot/default/waypoints.qc

index cce2ffb747076bf03485eb9fbee059037de3a3dc..f8456734caa0f528e93b7b0b6b50cfdbfae3ef75 100644 (file)
@@ -52,12 +52,6 @@ bool kh_no_radar_circles;
 .float siren_time;  //  time delay the siren
 //.float stuff_time;  //  time delay to stuffcmd a cvar
 
-int kh_keystatus[17];
-//kh_keystatus[0] = status of dropped keys, kh_keystatus[1 - 16] = player #
-//replace 17 with cvar("maxplayers") or similar !!!!!!!!!
-//for(i = 0; i < maxplayers; ++i)
-//     kh_keystatus[i] = "0";
-
 int kh_Team_ByID(int t)
 {
        if(t == 0) return NUM_TEAM_1;
@@ -340,18 +334,6 @@ void kh_Key_AssignTo(entity key, entity player)  // runs every time a key is pic
                if(key.kh_next)
                        key.kh_next.kh_prev = key;
 
-               float i;
-               i = kh_keystatus[key.owner.playerid];
-                       if(key.netname == "^1red key")
-                               i += 1;
-                       if(key.netname == "^4blue key")
-                               i += 2;
-                       if(key.netname == "^3yellow key")
-                               i += 4;
-                       if(key.netname == "^6pink key")
-                               i += 8;
-               kh_keystatus[key.owner.playerid] = i;
-
                kh_Key_Attach(key);
 
                if(key.kh_next == NULL)
index f317918175a11c79c0c078ddbdfbf697cd505eef..2ea30b50fe31ab5f742df66155f60c327ce3e073 100644 (file)
@@ -1016,6 +1016,7 @@ void waypoint_save_links()
                        entity link = waypoint_get_link(it, j);
                        if(link)
                        {
+                               // NOTE: vtos rounds vector components to 1 decimal place
                                string s = strcat(vtos(it.origin), "*", vtos(link.origin), "\n");
                                fputs(file, s);
                                ++c;
@@ -1088,6 +1089,7 @@ void waypoint_saveall()
                        continue;
 
                string s;
+               // NOTE: vtos rounds vector components to 1 decimal place
                s = strcat(vtos(it.origin + it.mins), "\n");
                s = strcat(s, vtos(it.origin + it.maxs));
                s = strcat(s, "\n");