mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-10 12:09:03 +00:00
Minifix for Phys_Magnet
This commit is contained in:
parent
1cca5814fd
commit
7b4d8a7cc6
1 changed files with 20 additions and 0 deletions
|
@ -1559,11 +1559,31 @@ CPhysMagnet::~CPhysMagnet( void )
|
|||
//-----------------------------------------------------------------------------
|
||||
void CPhysMagnet::Spawn( void )
|
||||
{
|
||||
/* BM: Preventing a crash
|
||||
Precache();
|
||||
|
||||
SetMoveType( MOVETYPE_NONE );
|
||||
SetSolid( SOLID_VPHYSICS );
|
||||
SetModel( STRING( GetModelName() ) );
|
||||
//*/
|
||||
SetMoveType( MOVETYPE_NONE );
|
||||
SetSolid( SOLID_VPHYSICS );
|
||||
|
||||
char *szModel = ( char *) STRING( GetModelName() );
|
||||
if (!szModel || !*szModel)
|
||||
{
|
||||
Warning( "%s at %.0f, %.0f, %0.f missing modelname!\n",
|
||||
GetClassname(),
|
||||
GetAbsOrigin().x,
|
||||
GetAbsOrigin().y,
|
||||
GetAbsOrigin().z );
|
||||
UTIL_Remove( this );
|
||||
return;
|
||||
}
|
||||
|
||||
PrecacheModel( szModel );
|
||||
SetModel( szModel );
|
||||
//*/
|
||||
|
||||
m_takedamage = DAMAGE_EVENTS_ONLY;
|
||||
|
||||
|
|
Loading…
Reference in a new issue