]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove redundant strcat1()
authorbones_was_here <bones_was_here@xonotic.au>
Fri, 29 Mar 2024 09:15:36 +0000 (19:15 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Fri, 29 Mar 2024 09:15:36 +0000 (19:15 +1000)
The reason for strcat1() is now fixed properly by darkplaces@b0abeba2 and a986d478

See also bae3de16e76ed9b25933db14b165ec86aa8f1608

qcsrc/lib/replicate.qh
qcsrc/server/command/getreplies.qc
qcsrc/server/ipban.qc
qcsrc/server/race.qc

index 65428c9cd985160f70971cf288f79a3a101d9429..c9fbd87fde1f6631bd936f28d8c9179147c098d5 100644 (file)
@@ -1,10 +1,5 @@
 #pragma once
 
-#ifdef SVQC
-// copies a string to a tempstring (so one can strunzone it)
-string strcat1(string s) = #115; // FRIK_FILE
-#endif
-
 #if defined(CSQC)
 const int REPLICATEVARS_SEND_ALL = -1; // sync all cvars with the server (init)
 const int REPLICATEVARS_CHECK = 0; // check if any cvar has changed and sync it with the server
@@ -68,7 +63,7 @@ const int REPLICATEVARS_DESTROY = 1; // destroy data associated with cvars (shut
                { strfree(field); }, \
                { \
                        /* also initialize to the default value of func when requesting cvars */ \
-                       string s = func(this, strcat1(field)); \
+                       string s = func(this, strcat(field)); \
                        if (s != field) \
                        { \
                                strcpy(field, s); \
index b6bde0c68c210121793de4b84275bc83e195e7f6..1746c107ba526f3170aa2d09e99b4cc0e0d80991 100644 (file)
@@ -331,7 +331,7 @@ void GetCvars_handleString_Fixup(entity this, entity store, string thisname, flo
        if (f >= 0) // also initialize to the fitting value for "" when sending cvars out
                if (thisname == name)
                {
-                       string s = func(this, strcat1(store.(field)));
+                       string s = func(this, strcat(store.(field)));
                        if (s != store.(field))
                        {
                                strcpy(store.(field), s);
@@ -386,7 +386,7 @@ void GetCvars(entity this, entity store, int f)
                LOG_INFO("Warning: requesting cvar values is deprecated. Client should send them automatically using REPLICATE.\n");
 
        if (f > 0)
-               s = strcat1(argv(f));
+               s = strcat(argv(f));
 
        get_cvars_f = f;
        get_cvars_s = s;
index a949da10b3ca150a1911c44622bc6c11396a2614..4fbef25ef8715bafb3ab93e721cdc49f30d6804e 100644 (file)
@@ -379,7 +379,7 @@ float Ban_GetClientIP(entity client)
        ban_ip1 = substring(s, 0, i1); // 8
        ban_ip2 = substring(s, 0, i2); // 16
        ban_ip3 = substring(s, 0, i3); // 24
-       ban_ip4 = strcat1(s); // 32
+       ban_ip4 = strcat(s); // 32
        return true;
 
 LABEL(ipv6)
@@ -593,21 +593,21 @@ void Ban_KickBanClient(entity client, float bantime, float masksize, string reas
        switch(masksize)
        {
                case 1:
-                       ip = strcat1(ban_ip1);
+                       ip = strcat(ban_ip1);
                        break;
                case 2:
-                       ip = strcat1(ban_ip2);
+                       ip = strcat(ban_ip2);
                        break;
                case 3:
-                       ip = strcat1(ban_ip3);
+                       ip = strcat(ban_ip3);
                        break;
                case 4:
                default:
-                       ip = strcat1(ban_ip4);
+                       ip = strcat(ban_ip4);
                        break;
        }
        if(ban_idfp)
-               id = strcat1(ban_idfp);
+               id = strcat(ban_idfp);
        else
                id = string_null;
 
index f8af3fc5f716c5ca12eb604c6f32ecd55c64d496..739eef06f0ef80ebf0540cecca52e2f764fb272f 100644 (file)
@@ -520,7 +520,7 @@ void race_SendTime(entity e, float cp, float t, float tvalid)
                {
                        recordtime = race_checkpoint_records[cp];
                        float myrecordtime = e.race_checkpoint_record[cp];
-                       recordholder = strcat1(race_checkpoint_recordholders[cp]); // make a tempstring copy, as we'll possibly strunzone it!
+                       recordholder = strcat(race_checkpoint_recordholders[cp]); // make a tempstring copy, as we'll possibly strunzone it!
                        if(recordholder == e.netname)
                                recordholder = "";