diff options
Diffstat (limited to 'gamemode/player_class/player_base.lua')
| -rw-r--r-- | gamemode/player_class/player_base.lua | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gamemode/player_class/player_base.lua b/gamemode/player_class/player_base.lua index a470104..02733a8 100644 --- a/gamemode/player_class/player_base.lua +++ b/gamemode/player_class/player_base.lua @@ -3,7 +3,7 @@ AddCSLuaFile() DEFINE_BASECLASS( "player_default" ) -local PLAYER = {} +local PLAYER = {} function PLAYER:GetHandsModel() @@ -79,7 +79,7 @@ function PLAYER:HandlePlayerNoClipping( velocity ) if ( self.Player:InVehicle() ) then return end - if ( self.Player:GetMoveType() != MOVETYPE_NOCLIP ) then + if ( self.Player:GetMoveType() != MOVETYPE_NOCLIP ) then if ( self.Player.m_bWasNoclipping ) then @@ -110,16 +110,16 @@ function PLAYER:HandlePlayerVaulting( velocity ) if ( velocity:Length() < 1000 ) then return end if ( self.Player:IsOnGround() ) then return end - self.Player.CalcIdeal = ACT_MP_SWIM + self.Player.CalcIdeal = ACT_MP_SWIM return true end function PLAYER:HandlePlayerSwimming( velocity ) - if ( self.Player:WaterLevel() < 2 ) then + if ( self.Player:WaterLevel() < 2 ) then self.Player.m_bInSwim = false - return false + return false end if ( velocity:Length2D() > 10 ) then @@ -129,12 +129,12 @@ function PLAYER:HandlePlayerSwimming( velocity ) end self.Player.m_bInSwim = true - + return true end -function PLAYER:HandlePlayerLanding( velocity, WasOnGround ) +function PLAYER:HandlePlayerLanding( velocity, WasOnGround ) if ( self.Player:GetMoveType() == MOVETYPE_NOCLIP ) then return end @@ -147,10 +147,10 @@ end function PLAYER:HandlePlayerDriving() return false - + end -function PLAYER:UpdateAnimation( velocity, maxseqgroundspeed ) +function PLAYER:UpdateAnimation( velocity, maxseqgroundspeed ) local len = velocity:Length() local movement = 1.0 @@ -164,7 +164,7 @@ function PLAYER:UpdateAnimation( velocity, maxseqgroundspeed ) -- if we're under water we want to constantly be swimming.. if ( self.Player:WaterLevel() >= 2 ) then rate = math.max( rate, 0.5 ) - elseif ( !self.Player:IsOnGround() && len >= 1000 ) then + elseif ( !self.Player:IsOnGround() && len >= 1000 ) then rate = 0.1; end @@ -177,7 +177,7 @@ function PLAYER:UpdateAnimation( velocity, maxseqgroundspeed ) end -function PLAYER:GrabEarAnimation() +function PLAYER:GrabEarAnimation() self.Player.ChatGestureWeight = self.Player.ChatGestureWeight or 0 @@ -335,4 +335,4 @@ function PLAYER:DoAnimationEvent( event, data ) return nil end -player_manager.RegisterClass( "player_base", PLAYER, "player_default" )
\ No newline at end of file +player_manager.RegisterClass( "player_base", PLAYER, "player_default" ) |
