]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Convert some float -> int
authorFreddy <schro.sb@gmail.com>
Mon, 30 Dec 2019 23:38:20 +0000 (00:38 +0100)
committerFreddy <schro.sb@gmail.com>
Tue, 31 Dec 2019 19:22:06 +0000 (20:22 +0100)
qcsrc/menu/xonotic/playerlist.qc

index e90eef23d3a11d2c63a2aa33798f49522508a396..1edc5b8400c8cc6347f5916125ebc34c850e5e0d 100644 (file)
@@ -2,11 +2,11 @@
 
 .float realUpperMargin2;
 
-const float PLAYERPARM_SCORE = 0;
-const float PLAYERPARM_PING = 1;
-const float PLAYERPARM_TEAM = 2;
-const float PLAYERPARM_NAME = 3;
-const float PLAYERPARM_COUNT = 4;
+const int PLAYERPARM_SCORE = 0;
+const int PLAYERPARM_PING = 1;
+const int PLAYERPARM_TEAM = 2;
+const int PLAYERPARM_NAME = 3;
+const int PLAYERPARM_COUNT = 4;
 
 entity makeXonoticPlayerList()
 {
@@ -33,7 +33,7 @@ void XonoticPlayerList_setPlayerList(entity me, string plist)
                s = bufstr_get(buf, i * PLAYERPARM_COUNT + PLAYERPARM_NAME);
                n = tokenize_console(s);
 
-               if(n == 4)
+               if(n == PLAYERPARM_COUNT)
                {
                        bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_SCORE, argv(0)); // -666
                        bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_PING,  argv(1)); // 100