mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-11 15:38:12 +00:00
Clamp gravity.
This commit is contained in:
parent
17ab997501
commit
08f5c265ce
@ -1034,7 +1034,7 @@ Vector VecCheckSplatToss( entvars_t *pev, const Vector &vecSpot1, Vector vecSpot
|
||||
Vector vecScale;
|
||||
Vector vecGrenadeVel;
|
||||
Vector vecTemp;
|
||||
float flGravity = g_psv_gravity->value;
|
||||
float flGravity = Q_max( g_psv_gravity->value, 0.1f );
|
||||
|
||||
// calculate the midpoint and apex of the 'triangle'
|
||||
vecMidPoint = vecSpot1 + ( vecSpot2 - vecSpot1 ) * 0.5f;
|
||||
@ -1050,6 +1050,9 @@ Vector VecCheckSplatToss( entvars_t *pev, const Vector &vecSpot1, Vector vecSpot
|
||||
|
||||
// Don't worry about actually hitting the target, this won't hurt us!
|
||||
|
||||
// TODO: Need another way to calculate height because current calculation is completely wrong
|
||||
// and there posible crash.
|
||||
|
||||
// How high should the grenade travel (subtract 15 so the grenade doesn't hit the ceiling)?
|
||||
float height = vecApex.z - vecSpot1.z - 15.0f;
|
||||
// How fast does the grenade need to travel to reach that height given gravity?
|
||||
|
Loading…
Reference in New Issue
Block a user