]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Work around a gmqcc bug
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 25 Jan 2015 04:26:33 +0000 (15:26 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 25 Jan 2015 04:26:33 +0000 (15:26 +1100)
25 files changed:
qcsrc/client/View.qc
qcsrc/client/bgmscript.qc
qcsrc/client/hud.qc
qcsrc/client/sortlist.qc
qcsrc/common/mapinfo.qc
qcsrc/common/notifications.qc
qcsrc/common/util.qc
qcsrc/menu/item/listbox.qc
qcsrc/menu/xonotic/colorpicker.qc
qcsrc/server/bot/havocbot/role_onslaught.qc
qcsrc/server/bot/navigation.qc
qcsrc/server/bot/scripting.qc
qcsrc/server/bot/waypoints.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/command/vote.qc
qcsrc/server/g_subs.qc
qcsrc/server/g_tetris.qc
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/gamemode_assault.qc
qcsrc/server/mutators/sandbox.qc
qcsrc/server/scores.qc
qcsrc/server/weapons/tracing.qc
qcsrc/warpzonelib/common.qc
qcsrc/warpzonelib/server.qc

index 013fd2ee15c484d01c3cde62e1eb9d9b08fa2b4f..59382a80e3d16600aee425696f5b55b4e1549c54 100644 (file)
@@ -31,7 +31,7 @@ void Porto_Draw()
        portal_number = 0;
        nextdir = dir;
 
-       for(;;)
+       for(0;;)
        {
                dir = nextdir;
                traceline(p, p + 65536 * dir, TRUE, porto);
index 9d024941e6bf00d4b8c7f53133deca7535edbde4..800e89972b67529f02ea3d1aabf4bf115519ee11 100644 (file)
@@ -195,7 +195,7 @@ float BGMScript(entity e)
        }
 
        // find the CURRENT line
-       for(;;)
+       for(0;;)
        {
                tokenize_console(bufstr_get(bgmscriptbuf, e.bgmscriptline));
                if(stof(argv(1)) >= bgmtime || argv(0) != e.bgmscript)
index 33d7f9f5c1c850f260757cd9d6064bd4a829e2d4..067770c519999da44e3680a768e2d5b2a025cb42 100644 (file)
@@ -3769,7 +3769,7 @@ void HUD_InfoMessages(void)
                        tm = teams.sort_next;
                        if (tm)
                        {
-                               for(; tm.sort_next; tm = tm.sort_next)
+                               for(0; tm.sort_next; tm = tm.sort_next)
                                {
                                        if(!tm.team_size || tm.team == NUM_SPECTATOR)
                                                continue;
index 225df0ce032a87b5e924c6495d3fcb6a265df1a4..8537dd336f7a48ce871f5aaa4124b7f9f438dcb7 100644 (file)
@@ -92,7 +92,7 @@ void Sort_Finish(entity sort)
 
 entity Sort_Get(entity sort, float i)
 {
-       for(; sort.sort_next && i > 0; --i)
+       for(0; sort.sort_next && i > 0; --i)
                sort = sort.sort_next;
        return sort;
 }
index 0e8402979d101a20d769439fbf8c20a442f2114f..2654d87063dfa50398b874313cd98751368c8118 100644 (file)
@@ -255,7 +255,7 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp
        mapMins = '0 0 0';
        mapMaxs = '0 0 0';
 
-       for(;;)
+       for(0;;)
        {
                if (!((s = fgets(fh))))
                        break;
@@ -789,7 +789,7 @@ void _MapInfo_Parse_Settemp(string pFilename, string acl, float type, string s,
                                print("Map ", pFilename, " references not existing config file ", s, "\n");
                        else
                        {
-                               for(;;)
+                               for(0;;)
                                {
                                        if (!((s = fgets(fh))))
                                                break;
@@ -932,7 +932,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        {
                                n = tokenize_console(cvar_string("g_cdtracks_remaplist"));
                                s = strcat(" ", cvar_string("g_cdtracks_dontusebydefault"), " ");
-                               for(;;)
+                               for(0;;)
                                {
                                        i = floor(random() * n);
                                        if(strstrofs(s, strcat(" ", argv(i), " "), 0) < 0)
@@ -980,7 +980,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
        }
 
        _MapInfo_Map_Reset();
-       for(;;)
+       for(0;;)
        {
                if (!((s = fgets(fh))))
                        break;
index 3e2de3eab0531d68e9f2bcb64433a6aad4aba034..5bb9fcdd51dbe4b30541700156d193fa3dbf1c1c 100644 (file)
@@ -306,7 +306,7 @@ string Process_Notif_Args(
        string selected, remaining = args;
        float sel_num = 0;
 
-       for(;(remaining != "");)
+       for(0;(remaining != "");)
        {
                selected = car(remaining); remaining = cdr(remaining);
 
index e5eadc4525bf77e1f7d201abbfdb303dcfd749ef..9e022a8adb99a13fc7a78c8da7b3a73127d0374f 100644 (file)
@@ -2538,7 +2538,7 @@ void FindConnectedComponent(entity e, .entity fld, findNextEntityNearFunction_t
        queue_end.FindConnectedComponent_processing = 1;
 
        // for each queued item:
-       for(; queue_start; queue_start = queue_start.fld)
+       for(0; queue_start; queue_start = queue_start.fld)
        {
                // find all neighbors of queue_start
                entity t;
index 275b99735b72529f974f015519770192fdb51509..b92beb3d1f7b954f6cf72193a2aef44b7f3ab70b 100644 (file)
@@ -131,7 +131,7 @@ float ListBox_keyDown(entity me, float key, float ascii, float shift)
        {
                float i = me.selectedItem;
                float a = me.getItemHeight(me, i);
-               for(;;)
+               for(0;;)
                {
                        --i;
                        if (i < 0)
@@ -146,7 +146,7 @@ float ListBox_keyDown(entity me, float key, float ascii, float shift)
        {
                float i = me.selectedItem;
                float a = me.getItemHeight(me, i);
-               for(;;)
+               for(0;;)
                {
                        ++i;
                        if (i >= me.nItems)
@@ -369,7 +369,7 @@ void ListBox_draw(entity me)
        float y;
        i = me.getItemAtPos(me, me.scrollPos);
        y = me.getItemStart(me, i) - me.scrollPos;
-       for(; i < me.nItems && y < 1; ++i)
+       for(0; i < me.nItems && y < 1; ++i)
        {
                draw_shift = boxToGlobal(eY * y, oldshift, oldscale);
                vector relSize = eX * (1 - me.controlWidth) + eY * me.getItemHeight(me, i);
index e0727373c14b3a4795db1cde2f3caadaec45bfbc..6e55a585e93219a5ee9e5f6daebea26e0a927b97 100644 (file)
@@ -73,7 +73,7 @@ vector color_hslimage(vector v, vector margin)
 float XonoticColorpicker_mouseDrag(entity me, vector coords)
 {
        float i, carets;
-       for(;;)
+       for(0;;)
        {
                i = me.controlledTextbox.cursorPos;
                if(i >= 2)
index bf5a6438934b309900e33a8f122f32c1ad4c970e..c9bf6098210aa7dd4c91c61bb305ae0e92ba21bf 100644 (file)
@@ -118,7 +118,7 @@ void havocbot_goalrating_ons_controlpoints_attack(float ratingscale)
        cp1 = cp2 = findchain(classname, "onslaught_controlpoint");
 
        // Filter control points
-       for (; cp2; cp2 = cp2.chain)
+       for(0; cp2; cp2 = cp2.chain)
        {
                cp2.wpcost = c = 0;
                cp2.wpconsidered = FALSE;
@@ -154,7 +154,7 @@ void havocbot_goalrating_ons_controlpoints_attack(float ratingscale)
        // We'll consider only the best case
        bestvalue = 99999999999;
        cp = world;
-       for (; cp1; cp1 = cp1.chain)
+       for(0; cp1; cp1 = cp1.chain)
        {
                if (!cp1.wpconsidered)
                        continue;
index 0f4c330ed8882b2037a6e99bb5f7652d76a421bb..d676c8eb30bb7b6770cffd1ccf2e360eeec69fcd 100644 (file)
@@ -64,7 +64,7 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float
        // Movement loop
        yaw = vectoyaw(move);
        move = end - org;
-       for (;;)
+       for(0;;)
        {
                if (boxesoverlap(end, end, org + m1 + '-1 -1 -1', org + m2 + '1 1 1'))
                {
@@ -108,7 +108,7 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float
                        {
                                swimming = TRUE;
                                org = trace_endpos - normalize(org - trace_endpos) * stepdist;
-                               for(; org_z < end_z + self.maxs_z; org_z += stepdist)
+                               for(0; org_z < end_z + self.maxs_z; org_z += stepdist)
                                {
                                                if(autocvar_bot_debug_tracewalk)
                                                        debugnode(org);
@@ -880,7 +880,7 @@ float navigation_routetogoal(entity e, vector startposition)
        if(e == world)
                return FALSE;
 
-       for (;;)
+       for(0;;)
        {
                // add the spawnfunc_waypoint to the path
                navigation_pushroute(e);
index 1770b4c63c90deb767ad13d5d9771387d9b9eaa3..99c2ba83002c17a6e9047f072a5b4bf2c4fb3828 100644 (file)
@@ -39,7 +39,7 @@ void bot_queuecommand(entity bot, string cmdstring)
                        if(cmdstr == "sound")
                        {
                                // find the LAST word
-                               for(;;)
+                               for(0;;)
                                {
                                        sp = strstrofs(parm, " ", 0);
                                        if(sp < 0)
index 870a558c579d3b270f8f160376fbcecb084d7db6..d7159c15985972173ad01585efbd3a2fa253621f 100644 (file)
@@ -985,7 +985,7 @@ float botframe_autowaypoints_fix_from(entity p, float walkfromwp, entity wp, .en
 
        tmin = 0;
        tmax = 1;
-       for(;;)
+       for(0;;)
        {
                if(tmax - tmin < 0.001)
                {
index 27ed6b8694e16ce8406b98b76cb7d95f020a19f7..ad4f4da52a95fb020bdebb6ed5851050d4c99e34 100644 (file)
@@ -85,7 +85,7 @@ void GameCommand_adminmsg(float request, float argc)
 
                        if((targets) && (admin_message))
                        {
-                               for(;targets;)
+                               for(0;targets;)
                                {
                                        t = car(targets); targets = cdr(targets);
 
@@ -1024,7 +1024,7 @@ void GameCommand_moveplayer(float request, float argc)
                        // lets see if the target(s) even actually exist.
                        if((targets) && (destination))
                        {
-                               for(;targets;)
+                               for(0;targets;)
                                {
                                        t = car(targets); targets = cdr(targets);
 
@@ -1376,7 +1376,7 @@ void GameCommand_shuffleteams(float request)
                                // build a list of the players in a random order
                                FOR_EACH_PLAYER(tmp_player)
                                {
-                                       for(;;)
+                                       for(0;;)
                                        {
                                                i = bound(1, floor(random() * maxclients) + 1, maxclients);
 
@@ -1518,7 +1518,7 @@ void GameCommand_trace(float request, float argc)
                                        float hitcount = 0;
                                        print("TEST CASE. If this returns the runaway loop counter error, possibly everything is oaky.\n");
                                        float worst_endpos_bug = 0;
-                                       for(;;)
+                                       for(0;;)
                                        {
                                                org = world.mins;
                                                delta = world.maxs - world.mins;
@@ -1547,7 +1547,7 @@ void GameCommand_trace(float request, float argc)
                                                                // how much do we need to back off?
                                                                safe = 1;
                                                                unsafe = 0;
-                                                               for(;;)
+                                                               for(0;;)
                                                                {
                                                                        pos = p * (1 - (safe + unsafe) * 0.5) + start * ((safe + unsafe) * 0.5);
                                                                        tracebox(pos, PL_MIN, PL_MAX, pos, MOVE_NOMONSTERS, world);
@@ -1581,7 +1581,7 @@ void GameCommand_trace(float request, float argc)
                                                                q0 = p;
                                                                dq = 0;
                                                                dqf = 1;
-                                                               for(;;)
+                                                               for(0;;)
                                                                {
                                                                        q = p + normalize(end - p) * (dq + dqf);
                                                                        if(q == q0)
index 214083eaee9f32c080ad221512e3dfe39a28ba58..fb09b7e9aa02094524f9127339f4223ea3e8b128 100644 (file)
@@ -615,7 +615,7 @@ float VoteCommand_checkargs(float startpos, float argc)
 
        p = strstrofs(cmdrestriction, ";", 0); // find first semicolon
 
-       for(;;)
+       for(0;;)
        {
                // we know that at any time, startpos <= argc - minargs
                // so this means: argc-minargs >= startpos >= argc, thus
index fd0dc7861e20b1cee25cdfaa0545231952d78d57..7f8fc68d34d95acbf8dca4de6517519c0268609d 100644 (file)
@@ -554,7 +554,7 @@ float tracebox_inverted (vector v1, vector mi, vector ma, vector v2, float nomon
        float c;
        c = 0;
 
-       for(;;)
+       for(0;;)
        {
                if(pos * dir >= v2 * dir)
                {
index f0ea33b61ee5bcad2117cd34089b7f9cfe85f35d..72e2fbda089d48683bb8297cbbca6f742a929ec2 100644 (file)
@@ -894,7 +894,7 @@ void CompletedLines()
 
        cleared = 0;
        y = TET_LINES;
-       for(;;)
+       for(0;;)
        {
                ln = GetLine(y);
                if(strstrofs(ln, "0", 0) < 0)
index 2a706754b9a85d0a10ca5a56ed1d6598c10ba3d4..1962d63c5ee3204e35172d8bb315e561298f3636 100644 (file)
@@ -439,7 +439,7 @@ void detect_maptype()
        vector o, v;
        float i;
 
-       for(;;)
+       for(0;;)
        {
                o = world.mins;
                o_x += random() * (world.maxs_x - world.mins_x);
index 803561245fabb3dae283fd1133674f1c78b1473e..43ebb25d1b5385214874326960c2c02e84e90ad2 100644 (file)
@@ -1045,7 +1045,7 @@ const float SND_LARGESOUND = 16;
 float sound_allowed(float dest, entity e)
 {
     // sounds from world may always pass
-    for (;;)
+    for(0;;)
     {
         if (e.classname == "body")
             e = e.enemy;
@@ -1484,7 +1484,7 @@ void InitializeEntity(entity e, void(void) func, float order)
 
     cur = initialize_entity_first;
     prev = world;
-    for (;;)
+    for(0;;)
     {
         if (!cur || cur.initialize_entity_order > order)
         {
index 8a8c50b38b8ab18ab31f40ee71b1fe39f4119937..a62460e22ff1c2bd26f773e01715b54b84a04e0f 100644 (file)
@@ -338,7 +338,7 @@ void havocbot_goalrating_ast_targets(float ratingscale)
 
        ad = findchain(classname, "func_assault_destructible");
 
-       for (; ad; ad = ad.chain)
+       for(0; ad; ad = ad.chain)
        {
                if (ad.target == "")
                        continue;
index e84c6d696a91e691ccadabf6c68cd927febbc97f..dec1bf3dd77cd35f523f1a2751029f2c0cd15c2f 100644 (file)
@@ -393,7 +393,7 @@ void sandbox_Database_Load()
        }
        else
        {
-               for(;;)
+               for(0;;)
                {
                        file_read = fgets(file_get);
                        if(file_read == "")
index bd83f0b69433bb7bc33ffce739def8d0410b2a98..d1a832ed71210b17b7f9cc81c4e9a00fe6b9d198 100644 (file)
@@ -833,7 +833,7 @@ void Score_NicePrint_Player(entity to, entity p, float w)
        sk = p.scorekeeper;
 
        s = strcat(s, p.netname);
-       for(;;)
+       for(0;;)
        {
                i = strlennocol(s) - NAMEWIDTH;
                if(i > 0)
index 55e6d5415e154bf583c1f5892c485a336aea40b8..dfe318cf050c6dcf988d8a790f739aa976604a52 100644 (file)
@@ -363,7 +363,7 @@ void fireBullet(vector start, vector dir, float spread, float max_solid_penetrat
 
        WarpZone_trace_forent = self;
 
-       for (;;)
+       for(0;;)
        {
                // TODO also show effect while tracing
                WarpZone_TraceBox_ThroughZone(start, '0 0 0', '0 0 0', end, FALSE, WarpZone_trace_forent, world, fireBullet_trace_callback);
index c1b3614c1706274893f943dffee777b99a525fff..222d667eefa6a4bc1473e55e6084cf45d7610a56 100644 (file)
@@ -263,7 +263,7 @@ void WarpZone_TraceBox_ThroughZone(vector org, vector mi, vector ma, vector end,
        sol = -1;
        frac = 0;
        i = 16;
-       for(;;)
+       for(0;;)
        {
                if(--i < 1)
                {
@@ -386,7 +386,7 @@ void WarpZone_TraceToss_ThroughZone(entity e, entity forent, entity zone, WarpZo
        }
        WarpZone_MakeAllSolid();
        i = 16;
-       for(;;)
+       for(0;;)
        {
                if(--i < 1)
                {
index 4b18d381bb0856bfe80ba0bf3a1e0b423b137641..7e83c35493754703be0721db1becb9f96de9f376 100644 (file)
@@ -834,7 +834,7 @@ void WarpZone_StartFrame()
                if(IS_NOT_A_CLIENT(e))
                {
                        if(warpzone_warpzones_exist)
-                               for(; (e = nextent(e)); )
+                               for(0; (e = nextent(e)); )
                                        WarpZone_StoreProjectileData(e);
                        break;
                }