mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-12 23:07:55 +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 )
|
bool CBaseAnimating::TestCollision( const Ray_t &ray, unsigned int fContentsMask, trace_t& tr )
|
||||||
{
|
{
|
||||||
// Return a special case for scaled physics objects
|
// 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;
|
Vector vecPosition;
|
||||||
QAngle vecAngles;
|
QAngle vecAngles;
|
||||||
pPhysObject->GetPosition( &vecPosition, &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;
|
return false;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user