Fix case where traces aren't using entities.

This commit is contained in:
Ryan Stecker 2013-02-03 19:42:38 -06:00
parent b684abd650
commit d75c7f1ab8
4 changed files with 4 additions and 1 deletions

View File

@ -42,6 +42,9 @@ DETOUR_DECL_STATIC2( PassServerEntityFilterFunc, bool, const IHandleEntity *, pT
if ( pTouch == pPass )
return DETOUR_STATIC_CALL( PassServerEntityFilterFunc )( pTouch, pPass ); // self checks aren't interesting
if ( !pTouch || !pPass )
return DETOUR_STATIC_CALL( PassServerEntityFilterFunc )( pTouch, pPass ); // need two valid entities
CBaseEntity *pEnt1 = const_cast<CBaseEntity *>( UTIL_EntityFromEntityHandle( pTouch ) );
CBaseEntity *pEnt2 = const_cast<CBaseEntity *>( UTIL_EntityFromEntityHandle( pPass ) );

View File

@ -40,7 +40,7 @@
/* Basic information exposed publicly */
#define SMEXT_CONF_NAME "CollisionHooks"
#define SMEXT_CONF_DESCRIPTION "Hook on entity collision"
#define SMEXT_CONF_VERSION "0.1"
#define SMEXT_CONF_VERSION "0.2"
#define SMEXT_CONF_AUTHOR "VoiDeD"
#define SMEXT_CONF_URL "http://saxtonhell.com"
#define SMEXT_CONF_LOGTAG "CLHOOK"