networking fixes
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "netprotocol.h"
|
||||
|
||||
static C_BaseEntity *s_pLocalEntity;
|
||||
|
||||
CEntitySystem *EntitySystem()
|
||||
{
|
||||
@@ -122,6 +123,7 @@ IEntityFactory *CEntitySystem::GetFactoryByClassname( const char *szName )
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
void CEntitySystem::DestroyEntityByIndex( uint32_t uIndex )
|
||||
{
|
||||
if ( uIndex >= MAX_EDICTS )
|
||||
@@ -129,6 +131,8 @@ void CEntitySystem::DestroyEntityByIndex( uint32_t uIndex )
|
||||
if (m_pEntities[uIndex])
|
||||
{
|
||||
V_printf("Deleting: %i\n", uIndex);
|
||||
if (m_pEntities[uIndex] == s_pLocalEntity)
|
||||
s_pLocalEntity = 0;
|
||||
delete m_pEntities[uIndex];
|
||||
m_pEntities[uIndex] = 0;
|
||||
}
|
||||
@@ -174,9 +178,6 @@ searchIndex:
|
||||
return (char*)pEntity+pCurrentMap->m_pFields[uCurrentIndex].m_uOffset;
|
||||
}
|
||||
|
||||
|
||||
static C_BaseEntity *s_pLocalEntity;
|
||||
|
||||
void CEntitySystem::NetRecvPacket( NetPacket_t *pPacket )
|
||||
{
|
||||
PlayerPacket_t *pPlayerPacket = (PlayerPacket_t*)pPacket->pData;
|
||||
|
||||
Reference in New Issue
Block a user