Replace classptr with EHANDLE in tank controls

This commit is contained in:
mittorn 2018-10-16 15:27:00 +00:00
parent 3c9b8b9d4b
commit 7f4479dc1d
1 changed files with 3 additions and 3 deletions

View File

@ -960,14 +960,14 @@ public:
virtual int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
CFuncTank *m_pTank;
EHANDLE m_pTank;
};
LINK_ENTITY_TO_CLASS( func_tankcontrols, CFuncTankControls )
TYPEDESCRIPTION CFuncTankControls::m_SaveData[] =
{
DEFINE_FIELD( CFuncTankControls, m_pTank, FIELD_CLASSPTR ),
DEFINE_FIELD( CFuncTankControls, m_pTank, FIELD_EHANDLE ),
};
IMPLEMENT_SAVERESTORE( CFuncTankControls, CBaseEntity )
@ -1001,7 +1001,7 @@ void CFuncTankControls::Think( void )
return;
}
m_pTank = (CFuncTank*)Instance( pTarget );
m_pTank = Instance( pTarget );
}
void CFuncTankControls::Spawn( void )