X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmapinfo.qh;h=b7115ef552522fd2786a3749166430e9a7ae8ea8;hb=35ded46b934755480248ac4ffe5d9ca4cc5dcc4e;hp=702798bbf861d3bfcb912ceac3b67a6afcd5052b;hpb=c1385b1eb134e4c40239273511fd63b97ff51815;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mapinfo.qh b/qcsrc/common/mapinfo.qh index 702798bbf..b7115ef55 100644 --- a/qcsrc/common/mapinfo.qh +++ b/qcsrc/common/mapinfo.qh @@ -1,6 +1,11 @@ #ifndef MAPINFO_H #define MAPINFO_H +bool autocvar_developer_mapper; + +#define LOG_MAPWARN(...) MACRO_BEGIN { if (autocvar_developer_mapper) LOG_WARNING(__VA_ARGS__); } MACRO_END +#define LOG_MAPWARNF(...) MACRO_BEGIN { if (autocvar_developer_mapper) LOG_WARNINGF(__VA_ARGS__); } MACRO_END + #include "util.qh" CLASS(Gametype, Object) @@ -23,9 +28,15 @@ CLASS(Gametype, Object) ATTRIB(Gametype, m_mutators, string, string_null) ATTRIB(Gametype, m_parse_mapinfo, bool(string k, string v), func_null) - METHOD(Gametype, describe, string(entity this)) { return this.gametype_description; } + METHOD(Gametype, describe, string(Gametype this)) + { + TC(Gametype, this); + return this.gametype_description; + } - METHOD(Gametype, display, void(entity this, void(string name, string icon) returns)) { + METHOD(Gametype, display, void(Gametype this, void(string name, string icon) returns)) + { + TC(Gametype, this); returns(this.message, strcat("gametype_", this.mdl)); }