5858
5959#include " modules/listeners/listeners_manager.h"
6060#include " utilities/conversions.h"
61+ #include " modules/entities/entities_entity.h"
6162
6263
6364// -----------------------------------------------------------------------------
@@ -468,8 +469,7 @@ void CSourcePython::OnEdictFreed( const edict_t *edict )
468469#ifdef ENGINE_BMS
469470void CSourcePython::OnEntityPreSpawned ( CBaseEntity *pEntity )
470471{
471- CPointer pAddress = CPointer ((unsigned long ) pEntity);
472- CALL_LISTENERS (OnEntityPreSpawned, pAddress);
472+ CALL_LISTENERS (OnEntityPreSpawned, ptr ((CBaseEntityWrapper*) pEntity));
473473}
474474#endif
475475
@@ -483,20 +483,17 @@ void CSourcePython::OnEntityCreated( CBaseEntity *pEntity )
483483 if (pServerUnknown)
484484 pEdict->m_pNetworkable = pServerUnknown->GetNetworkable ();
485485 }
486- CPointer pAddress = CPointer ((unsigned long ) pEntity);
487- CALL_LISTENERS (OnEntityCreated, iIndex, ptr (&pAddress));
486+ CALL_LISTENERS (OnEntityCreated, iIndex, ptr ((CBaseEntityWrapper*) pEntity));
488487}
489488
490489void CSourcePython::OnEntitySpawned ( CBaseEntity *pEntity )
491490{
492- CPointer pAddress = CPointer ((unsigned long ) pEntity);
493- CALL_LISTENERS (OnEntitySpawned, IndexFromBaseEntity (pEntity), ptr (&pAddress));
491+ CALL_LISTENERS (OnEntitySpawned, IndexFromBaseEntity (pEntity), ptr ((CBaseEntityWrapper*) pEntity));
494492}
495493
496494void CSourcePython::OnEntityDeleted ( CBaseEntity *pEntity )
497495{
498- CPointer pAddress = CPointer ((unsigned long ) pEntity);
499- CALL_LISTENERS (OnEntityDeleted, IndexFromBaseEntity (pEntity), ptr (&pAddress));
496+ CALL_LISTENERS (OnEntityDeleted, IndexFromBaseEntity (pEntity), ptr ((CBaseEntityWrapper*) pEntity));
500497}
501498
502499void CSourcePython::OnDataLoaded ( MDLCacheDataType_t type, MDLHandle_t handle )
0 commit comments