mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-02-09 05:24:17 +00:00
Replace classptr with EHANDLE in tank controls
This commit is contained in:
parent
3c9b8b9d4b
commit
7f4479dc1d
@ -960,14 +960,14 @@ public:
|
|||||||
virtual int Restore( CRestore &restore );
|
virtual int Restore( CRestore &restore );
|
||||||
static TYPEDESCRIPTION m_SaveData[];
|
static TYPEDESCRIPTION m_SaveData[];
|
||||||
|
|
||||||
CFuncTank *m_pTank;
|
EHANDLE m_pTank;
|
||||||
};
|
};
|
||||||
|
|
||||||
LINK_ENTITY_TO_CLASS( func_tankcontrols, CFuncTankControls )
|
LINK_ENTITY_TO_CLASS( func_tankcontrols, CFuncTankControls )
|
||||||
|
|
||||||
TYPEDESCRIPTION CFuncTankControls::m_SaveData[] =
|
TYPEDESCRIPTION CFuncTankControls::m_SaveData[] =
|
||||||
{
|
{
|
||||||
DEFINE_FIELD( CFuncTankControls, m_pTank, FIELD_CLASSPTR ),
|
DEFINE_FIELD( CFuncTankControls, m_pTank, FIELD_EHANDLE ),
|
||||||
};
|
};
|
||||||
|
|
||||||
IMPLEMENT_SAVERESTORE( CFuncTankControls, CBaseEntity )
|
IMPLEMENT_SAVERESTORE( CFuncTankControls, CBaseEntity )
|
||||||
@ -1001,7 +1001,7 @@ void CFuncTankControls::Think( void )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pTank = (CFuncTank*)Instance( pTarget );
|
m_pTank = Instance( pTarget );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFuncTankControls::Spawn( void )
|
void CFuncTankControls::Spawn( void )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user