Stunt tweaks

This commit is contained in:
Fesiug 2024-01-08 03:38:54 -05:00
parent 2e2fba2f6a
commit 0188306894
1 changed files with 8 additions and 8 deletions

View File

@ -183,20 +183,21 @@ hook.Add( "Move", "Benny_Move", function( ply, mv )
if mv:KeyDown( IN_ALT1 ) then if mv:KeyDown( IN_ALT1 ) then
local dig = Vector( mv:GetForwardSpeed()+0.01, mv:GetSideSpeed(), 0 ):GetNormalized() local dig = Vector( mv:GetForwardSpeed()+0.01, mv:GetSideSpeed(), 0 ):GetNormalized()
local dug = Angle( 0, ply:EyeAngles().y, 0 ) local dug = Angle( 0, ply:EyeAngles().y, 0 )
ply:SetGroundEntity( NULL ) local upspeed = 120
local upspeed = 100 local movespeed = 230
local movespeed = 200
local pitch = ply:EyeAngles().p local pitch = ply:EyeAngles().p
if pitch < -15 then if pitch < -12 then
upspeed = 250 upspeed = 250
movespeed = 320 movespeed = 320
elseif pitch < 15 then elseif pitch < 12 then
upspeed = 150 upspeed = 160
movespeed = 260 movespeed = 260
end end
dig:Mul( movespeed ) dig:Mul( movespeed )
if !ply:OnGround() then upspeed = mv:GetVelocity().z end
ply:SetGroundEntity( NULL )
mv:SetVelocity( dug:Forward()*dig.x + dug:Right()*dig.y + (vector_up*upspeed) ) mv:SetVelocity( dug:Forward()*dig.x + dug:Right()*dig.y + (vector_up*upspeed) )
ply:AddFlags( FL_ANIMDUCKING ) ply:AddVCDSequenceToGestureSlot( GESTURE_SLOT_JUMP, ply:SelectWeightedSequence( ACT_GMOD_GESTURE_RANGE_ZOMBIE_SPECIAL ), 0.6, true )
ply:SetJumpBoost( 1 ) ply:SetJumpBoost( 1 )
if CLIENT and IsFirstTimePredicted() then if CLIENT and IsFirstTimePredicted() then
ply:EmitSound( "weapons/slam/throw.wav", 70, 200, 0.5 ) ply:EmitSound( "weapons/slam/throw.wav", 70, 200, 0.5 )
@ -208,7 +209,6 @@ hook.Add( "Move", "Benny_Move", function( ply, mv )
else else
ply:SetJumpBoost( 0 ) ply:SetJumpBoost( 0 )
end end
ply:RemoveFlags( FL_ANIMDUCKING )
end end
--debugoverlay.Box( Target+(TargetNor*16), ba, bb, 0, CR ) --debugoverlay.Box( Target+(TargetNor*16), ba, bb, 0, CR )