From a0a801380e31ad270768fef20e078a599262df5a Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 2 Feb 2012 19:07:41 +0100 Subject: [PATCH] mapinfo: rename nexball -> nb, keepaway -> ka, freezetag -> ft, to keep all names consistently short. Old names are supported for compatibility, but warned about. --- qcsrc/common/mapinfo.qc | 18 ++++++++++++++++++ qcsrc/common/mapinfo.qh | 6 +++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 1b32c9d1d..9dd02ca4c 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -637,6 +637,24 @@ void _MapInfo_Map_ApplyGametypeEx(string s, float pWantedType, float pThisType) float MapInfo_Type_FromString(string t) { entity e; + if(t == "nexball") + { + print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t); + t = "nb"; + print("'. Should use '", t, "'.\n"); + } + if(t == "freezetag") + { + print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t); + t = "ft"; + print("'. Should use '", t, "'.\n"); + } + if(t == "keepaway") + { + print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t); + t = "ka"; + print("'. Should use '", t, "'.\n"); + } if(t == "all") return MAPINFO_TYPE_ALL; for(e = MapInfo_Type_first; e; e = e.enemy) diff --git a/qcsrc/common/mapinfo.qh b/qcsrc/common/mapinfo.qh index 4e73886d3..a3bb4efbf 100644 --- a/qcsrc/common/mapinfo.qh +++ b/qcsrc/common/mapinfo.qh @@ -72,13 +72,13 @@ REGISTER_GAMETYPE(_("Assault"),as,g_assault,ASSAULT,"timelimit=20") REGISTER_GAMETYPE(_("Onslaught"),ons,g_onslaught,ONSLAUGHT,"timelimit=20") #define g_onslaught IS_GAMETYPE(ONSLAUGHT) -REGISTER_GAMETYPE(_("Nexball"),nexball,g_nexball,NEXBALL,"timelimit=20 pointlimit=5 leadlimit=0") +REGISTER_GAMETYPE(_("Nexball"),nb,g_nexball,NEXBALL,"timelimit=20 pointlimit=5 leadlimit=0") #define g_nexball IS_GAMETYPE(NEXBALL) -REGISTER_GAMETYPE(_("Freeze Tag"),freezetag,g_freezetag,FREEZETAG,"timelimit=20 pointlimit=10 teams=2 leadlimit=0") +REGISTER_GAMETYPE(_("Freeze Tag"),ft,g_freezetag,FREEZETAG,"timelimit=20 pointlimit=10 teams=2 leadlimit=0") #define g_freezetag IS_GAMETYPE(FREEZETAG) -REGISTER_GAMETYPE(_("Keepaway"),keepaway,g_keepaway,KEEPAWAY,"timelimit=20 pointlimit=30") +REGISTER_GAMETYPE(_("Keepaway"),ka,g_keepaway,KEEPAWAY,"timelimit=20 pointlimit=30") #define g_keepaway IS_GAMETYPE(KEEPAWAY) float MAPINFO_FEATURE_WEAPONS = 1; // not defined for minstagib-only maps -- 2.39.2