From de427eb5cc42d4165243731e6854ca2f1450ca65 Mon Sep 17 00:00:00 2001 From: TimePath Date: Tue, 15 Mar 2016 21:05:35 +1100 Subject: [PATCH] Delete old macros --- qcsrc/client/main.qh | 7 ------- qcsrc/server/cl_client.qc | 4 ++-- qcsrc/server/mapvoting.qc | 2 +- qcsrc/server/miscfunctions.qc | 4 ++-- qcsrc/server/miscfunctions.qh | 3 +-- qcsrc/server/pathlib/pathlib.qh | 2 +- 6 files changed, 7 insertions(+), 15 deletions(-) diff --git a/qcsrc/client/main.qh b/qcsrc/client/main.qh index 9c672ad07..9d7c40689 100644 --- a/qcsrc/client/main.qh +++ b/qcsrc/client/main.qh @@ -6,13 +6,6 @@ // -------------------------------------------------------------------------- // MENU Functionality -const float DATABUF_PING = 0; -#define DATABUF_CAPTURES (1*maxclients) -#define DATABUF_DEATHS (2*maxclients) -#define DATABUF_RETURNS (3*maxclients) - -#define DATABUF_NEXT (5*maxclients) - void setpredraw(entity this, void(entity) pdfunc); // -------------------------------------------------------------------------- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index d984c3c38..d41cf563a 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -2066,9 +2066,9 @@ void PlayerPreThink () if(time > self.version_nagtime) { // don't notify git users - if(strstr(self.cvar_g_xonoticversion, "git", 0) < 0 && strstr(self.cvar_g_xonoticversion, "autobuild", 0) < 0) + if(strstrofs(self.cvar_g_xonoticversion, "git", 0) < 0 && strstrofs(self.cvar_g_xonoticversion, "autobuild", 0) < 0) { - if(strstr(autocvar_g_xonoticversion, "git", 0) >= 0 || strstr(autocvar_g_xonoticversion, "autobuild", 0) >= 0) + if(strstrofs(autocvar_g_xonoticversion, "git", 0) >= 0 || strstrofs(autocvar_g_xonoticversion, "autobuild", 0) >= 0) { // notify release users if connecting to git LOG_TRACE("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", autocvar_g_xonoticversion, " (beta)^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n"); diff --git a/qcsrc/server/mapvoting.qc b/qcsrc/server/mapvoting.qc index 409674f0a..7a615fc86 100644 --- a/qcsrc/server/mapvoting.qc +++ b/qcsrc/server/mapvoting.qc @@ -191,7 +191,7 @@ void MapVote_AddVotable(string nextMap, float isSuggestion) } if(i >= mapvote_screenshot_dirs_count) i = 0; // FIXME maybe network this error case, as that means there is no mapshot on the server? - for(o = strstr(pakfile, "/", 0)+1; o > 0; o = strstr(pakfile, "/", 0)+1) + for(o = strstrofs(pakfile, "/", 0)+1; o > 0; o = strstrofs(pakfile, "/", 0)+1) pakfile = substring(pakfile, o, -1); mapvote_maps_screenshot_dir[mapvote_count] = i; diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 77239e7b1..c59e8a4bf 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -237,8 +237,8 @@ string formatmessage(string msg) break; // too many replacements n = n - 1; - p1 = strstr(msg, "%", p); // NOTE: this destroys msg as it's a tempstring! - p2 = strstr(msg, "\\", p); // NOTE: this destroys msg as it's a tempstring! + p1 = strstrofs(msg, "%", p); // NOTE: this destroys msg as it's a tempstring! + p2 = strstrofs(msg, "\\", p); // NOTE: this destroys msg as it's a tempstring! if (p1 < 0) p1 = p2; diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index dd93aa329..4a6829a74 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -132,13 +132,12 @@ string strcat1(string s) = #115; // FRIK_FILE float logfile_open; float logfile; -#define strstr strstrofs /* // NOTE: DO NOT USE THIS FUNCTION TOO OFTEN. // IT WILL MOST PROBABLY DESTROY _ALL_ OTHER TEMP // STRINGS AND TAKE QUITE LONG. haystack and needle MUST // BE CONSTANT OR strzoneD! -float strstr(string haystack, string needle, float offset) +float strstrofs(string haystack, string needle, float offset) { float len, endpos; string found; diff --git a/qcsrc/server/pathlib/pathlib.qh b/qcsrc/server/pathlib/pathlib.qh index c71594818..736444024 100644 --- a/qcsrc/server/pathlib/pathlib.qh +++ b/qcsrc/server/pathlib/pathlib.qh @@ -5,7 +5,7 @@ .entity path_prev; #define inwater(point) (pointcontents(point) == CONTENT_WATER) -#define medium spawnshieldtime +.int medium; const vector PLIB_FORWARD = '0 1 0'; //#define PLIB_BACK '0 -1 0' -- 2.39.2