mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-25 06:15:30 +03:00
Fixed crash when a prop_dynamic with a model scale has no physics object
This commit is contained in:
parent
6945ef2468
commit
d231606020
@ -2930,9 +2930,9 @@ void CBaseAnimating::InvalidateBoneCache( void )
|
||||
bool CBaseAnimating::TestCollision( const Ray_t &ray, unsigned int fContentsMask, trace_t& tr )
|
||||
{
|
||||
// Return a special case for scaled physics objects
|
||||
if ( GetModelScale() != 1.0f )
|
||||
IPhysicsObject *pPhysObject = VPhysicsGetObject();
|
||||
if ( GetModelScale() != 1.0f && pPhysObject )
|
||||
{
|
||||
IPhysicsObject *pPhysObject = VPhysicsGetObject();
|
||||
Vector vecPosition;
|
||||
QAngle vecAngles;
|
||||
pPhysObject->GetPosition( &vecPosition, &vecAngles );
|
||||
|
@ -2283,11 +2283,7 @@ bool CDynamicProp::TestCollision( const Ray_t &ray, unsigned int mask, trace_t&
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef MAPBASE // From Alien Swarm SDK
|
||||
return BaseClass::TestCollision( ray, mask, trace );
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user