From 6f4ec8dac09398cd2472b489e3c65284d8cee633 Mon Sep 17 00:00:00 2001 From: Fesiug Date: Sat, 23 Mar 2024 21:18:11 -0400 Subject: [PATCH] Don't do some of these animations --- gamemodes/benny/gamemode/player.lua | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gamemodes/benny/gamemode/player.lua b/gamemodes/benny/gamemode/player.lua index d46248b..506f5c1 100644 --- a/gamemodes/benny/gamemode/player.lua +++ b/gamemodes/benny/gamemode/player.lua @@ -129,3 +129,41 @@ function PT:HandlerCheck() local wep = self:GetActiveWeapon() return ( wep:IsValid() and wep:GetClass() == "itemhandler" and wep.GetActiveR ) and wep or false end + +-- Temporary + +function GM:UpdateAnimation( ply, vel, maxseqgroundspeed ) + local len = vel:Length() + local movement = 1.0 + + if ( len > 0.2 ) then + movement = ( len / maxseqgroundspeed ) + end + + local rate = math.min( movement, 2 ) + + -- if we're under water we want to constantly be swimming.. + if ( ply:WaterLevel() >= 2 ) then + rate = math.max( rate, 0.5 ) + elseif ( !ply:IsOnGround() && len >= 1000 ) then + rate = 0.1 + end + + ply:SetPlaybackRate( rate ) +end + +function GM:HandlePlayerJumping( ply, vel ) + return false +end + +function GM:HandlePlayerVaulting( ply, vel ) + return false +end + +function GM:HandlePlayerLanding( ply, vel, onground ) + return false +end + +function GM:HandlePlayerNoClipping( ply, vel ) + return false +end \ No newline at end of file