From: bones_was_here Date: Fri, 29 Mar 2024 09:15:36 +0000 (+1000) Subject: Remove redundant strcat1() X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=845d2e46ccc4d7c9ab610d9c230fb492ce959f00;p=xonotic%2Fxonotic-data.pk3dir.git Remove redundant strcat1() The reason for strcat1() is now fixed properly by darkplaces@b0abeba2 and a986d478 See also bae3de16e76ed9b25933db14b165ec86aa8f1608 --- diff --git a/qcsrc/lib/replicate.qh b/qcsrc/lib/replicate.qh index 65428c9cd..c9fbd87fd 100644 --- a/qcsrc/lib/replicate.qh +++ b/qcsrc/lib/replicate.qh @@ -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); \ diff --git a/qcsrc/server/command/getreplies.qc b/qcsrc/server/command/getreplies.qc index b6bde0c68..1746c107b 100644 --- a/qcsrc/server/command/getreplies.qc +++ b/qcsrc/server/command/getreplies.qc @@ -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; diff --git a/qcsrc/server/ipban.qc b/qcsrc/server/ipban.qc index a949da10b..4fbef25ef 100644 --- a/qcsrc/server/ipban.qc +++ b/qcsrc/server/ipban.qc @@ -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; diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index f8af3fc5f..739eef06f 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -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 = "";