mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-08 11:01:33 +00:00
Merge a3ba661901
into ceb6d4d783
This commit is contained in:
commit
2b59922754
1 changed files with 16 additions and 3 deletions
|
@ -1559,11 +1559,24 @@ CPhysMagnet::~CPhysMagnet( void )
|
|||
//-----------------------------------------------------------------------------
|
||||
void CPhysMagnet::Spawn( void )
|
||||
{
|
||||
Precache();
|
||||
|
||||
SetMoveType( MOVETYPE_NONE );
|
||||
SetSolid( SOLID_VPHYSICS );
|
||||
SetModel( STRING( GetModelName() ) );
|
||||
|
||||
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