From: TimePath Date: Thu, 3 Dec 2015 07:39:05 +0000 (+1100) Subject: Assert harder X-Git-Tag: xonotic-v0.8.2~1577 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f83a8731b0040e70df498e86d3c1d61aa5d2f0c4;p=xonotic%2Fxonotic-data.pk3dir.git Assert harder --- diff --git a/qcsrc/common/effects/qc/globalsound.qc b/qcsrc/common/effects/qc/globalsound.qc index 4f942ef0c..4b38615f6 100644 --- a/qcsrc/common/effects/qc/globalsound.qc +++ b/qcsrc/common/effects/qc/globalsound.qc @@ -20,7 +20,7 @@ */ void globalsound(int channel, entity from, entity gs, float r, int chan, float vol, float atten) { - assert(IS_PLAYER(from)); + assert(IS_PLAYER(from), eprint(from)); if (channel == MSG_ONE && !IS_REAL_CLIENT(msg_entity)) return; WriteHeader(channel, globalsound); WriteByte(channel, gs.m_id); @@ -43,7 +43,7 @@ */ void playersound(int channel, entity from, entity ps, float r, int chan, float vol, float atten) { - assert(IS_PLAYER(from)); + assert(IS_PLAYER(from), eprint(from)); if (channel == MSG_ONE && !IS_REAL_CLIENT(msg_entity)) return; WriteHeader(channel, playersound); WriteByte(channel, ps.m_id); diff --git a/qcsrc/lib/log.qh b/qcsrc/lib/log.qh index 2a35e8e9a..af2bab0f4 100644 --- a/qcsrc/lib/log.qh +++ b/qcsrc/lib/log.qh @@ -12,7 +12,7 @@ } \ while (0) -#define assert(expr, ...) _assert(LOG_WARNING, expr, __VA_ARGS__) +#define assert(expr, ...) _assert(LOG_SEVERE, expr, __VA_ARGS__) #define ASSERT(expr, ...) _assert(LOG_FATAL, expr, __VA_ARGS__) #define _assert(f, expr, then) \ do \