From: TimePath Date: Wed, 9 Mar 2016 22:50:41 +0000 (+1100) Subject: Suppress mutator blocked weapon warnings X-Git-Tag: xonotic-v0.8.2~1136 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bd198286a900942335bfa3748889d94c044f8f74;p=xonotic%2Fxonotic-data.pk3dir.git Suppress mutator blocked weapon warnings --- diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 56dcce489..d853eeac3 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -10,11 +10,6 @@ #include "mapinfo.qh" #endif -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 - // generic string stuff int _MapInfo_Cache_Active; diff --git a/qcsrc/common/mapinfo.qh b/qcsrc/common/mapinfo.qh index 702798bbf..ab7233ef2 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) diff --git a/qcsrc/server/weapons/spawning.qc b/qcsrc/server/weapons/spawning.qc index 578c941f7..579e6fdff 100644 --- a/qcsrc/server/weapons/spawning.qc +++ b/qcsrc/server/weapons/spawning.qc @@ -29,7 +29,7 @@ void weapon_defaultspawnfunc(entity this, Weapon e) { if (e.spawnflags & WEP_FLAG_MUTATORBLOCKED) { - objerror("Attempted to spawn a mutator-blocked weapon rejected"); + LOG_MAPWARNF("Attempted to spawn a mutator-blocked weapon rejected: prvm_edict server %i", this); startitem_failed = true; return; }