mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-26 14:55:30 +03:00
Fix CBaseEntity::SetMass
This commit is contained in:
parent
8672b7bb3f
commit
d13f2a3e71
@ -2424,14 +2424,13 @@ inline float CBaseEntity::GetMass()
|
||||
else
|
||||
{
|
||||
Warning("Tried to call GetMass() on %s but it has no physics.\n", GetDebugName());
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
inline void CBaseEntity::SetMass(float mass)
|
||||
{
|
||||
mass = MAX(0, mass);
|
||||
Assert(mass > 0);
|
||||
mass = clamp(mass, VPHYSICS_MIN_MASS, VPHYSICS_MAX_MASS);
|
||||
|
||||
IPhysicsObject *vPhys = VPhysicsGetObject();
|
||||
if (vPhys)
|
||||
|
Loading…
Reference in New Issue
Block a user