From f83a8731b0040e70df498e86d3c1d61aa5d2f0c4 Mon Sep 17 00:00:00 2001 From: TimePath Date: Thu, 3 Dec 2015 18:39:05 +1100 Subject: [PATCH] Assert harder --- qcsrc/common/effects/qc/globalsound.qc | 4 ++-- qcsrc/lib/log.qh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 \ -- 2.39.2