mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-08 11:01:33 +00:00
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:
parent
a62efecf62
commit
5d0d2c1f09
1 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue