This commit is contained in:
speedvoltage 2025-03-30 17:04:16 -07:00 committed by GitHub
commit 2b59922754
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;