Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Airstrafe #6

Merged
merged 2 commits into from
Jan 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lua/cfc_parachutes/shared/sh_parachute.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ local cvHorizontalSpeedLimit
local cvSprintBoost
local cvHandling

local vHorizontalSpeedLimitDamageGrace = 25

local function setupConVars()
local FALL_SPEED = GetConVar( "cfc_parachute_fall_speed" )
local FALL_LERP = GetConVar( "cfc_parachute_fall_lerp" )
Expand Down Expand Up @@ -112,7 +114,10 @@ local function addHorizontalVel( ply, chute, vel, timeMult )
vel[1] = vel[1] * mult
vel[2] = vel[2] * mult
if SERVER then -- so propsurf breaks it
chute:ChuteTakeDamage( 1 )
local gracedLimit = hSpeedLimit + vHorizontalSpeedLimitDamageGrace
if hSpeedCur > gracedLimit then -- so airstrafing DOESNT break it
chute:ChuteTakeDamage( 1 )
end
end
end

Expand Down
Loading