Fix Vphysics negative Z punting

► Fixed an issue where punting an object while aiming downwards would punt in upwards. Only props are now affected by this to allow prop boosting.
This commit is contained in:
speedvoltage 2025-03-09 18:34:03 +01:00
parent a62efecf62
commit 5d0d2c1f09

View file

@ -1298,8 +1298,14 @@ void CWeaponPhysCannon::PuntVPhysics( CBaseEntity *pEntity, const Vector &vecFor
if( forward.z < 0 )
{
//reflect, but flatten the trajectory out a bit so it's easier to hit standing targets
forward.z *= -0.65f;
// Only apply upward Z punt for props to still let players prop boost
CBaseProp *pProp = dynamic_cast< CBaseProp * >( pEntity );
if (pProp)
{
//reflect, but flatten the trajectory out a bit so it's easier to hit standing targets
forward.z *= -0.65f;
}
}
// NOTE: Do this first to enable motion (if disabled) - so forces will work