1.1 --- a/trace_plugin/sdk_util.cpp Thu May 20 19:51:09 2004 +0000
1.2 +++ b/trace_plugin/sdk_util.cpp Mon May 31 19:03:03 2004 +0000
1.3 @@ -6,6 +6,7 @@
1.4 // Selected portions of dlls/util.cpp from SDK 2.1.
1.5 // Functions copied from there as needed...
1.6 // And modified to avoid buffer overflows (argh).
1.7 +// Also modified to remove dependency on CBaseEntity class.
1.8
1.9 /***
1.10 *
1.11 @@ -31,7 +32,6 @@
1.12
1.13 #include <extdll.h>
1.14 #include "sdk_util.h"
1.15 -#include <cbase.h>
1.16
1.17 #include <string.h> // for strncpy(), etc
1.18
1.19 @@ -68,13 +68,13 @@
1.20 }
1.21
1.22
1.23 -void UTIL_HudMessage(CBaseEntity *pEntity, const hudtextparms_t &textparms,
1.24 +void META_UTIL_HudMessage(edict_t *pEntity, const hudtextparms_t &textparms,
1.25 const char *pMessage)
1.26 {
1.27 - if ( !pEntity )
1.28 + if ( FNullEnt(pEntity) || pEntity->free )
1.29 return;
1.30
1.31 - MESSAGE_BEGIN( MSG_ONE, SVC_TEMPENTITY, NULL, ENT(pEntity->pev) );
1.32 + MESSAGE_BEGIN( MSG_ONE, SVC_TEMPENTITY, NULL, pEntity );
1.33 WRITE_BYTE( TE_TEXTMESSAGE );
1.34 WRITE_BYTE( textparms.channel & 0xFF );
1.35