diff -r 0d76c39e4483 -r 77537dee7ca6 wdmisc_plugin/sdk_util.cpp --- a/wdmisc_plugin/sdk_util.cpp Sat May 29 23:08:20 2004 +0000 +++ b/wdmisc_plugin/sdk_util.cpp Sat May 29 23:08:59 2004 +0000 @@ -6,6 +6,7 @@ // Selected portions of dlls/util.cpp from SDK 2.1. // Functions copied from there as needed... // And modified to avoid buffer overflows (argh). +// Also modified to remove dependency on CBaseEntity class. /*** * @@ -31,7 +32,6 @@ #include #include "sdk_util.h" -#include #include // for strncpy(), etc @@ -68,13 +68,13 @@ } -void UTIL_HudMessage(CBaseEntity *pEntity, const hudtextparms_t &textparms, +void META_UTIL_HudMessage(edict_t *pEntity, const hudtextparms_t &textparms, const char *pMessage) { - if ( !pEntity ) + if ( FNullEnt(pEntity) || pEntity->free ) return; - MESSAGE_BEGIN( MSG_ONE, SVC_TEMPENTITY, NULL, ENT(pEntity->pev) ); + MESSAGE_BEGIN( MSG_ONE, SVC_TEMPENTITY, NULL, pEntity ); WRITE_BYTE( TE_TEXTMESSAGE ); WRITE_BYTE( textparms.channel & 0xFF );