summaryrefslogtreecommitdiff
path: root/gamemode/player_class/player_zombie.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/player_class/player_zombie.lua')
-rw-r--r--gamemode/player_class/player_zombie.lua34
1 files changed, 17 insertions, 17 deletions
diff --git a/gamemode/player_class/player_zombie.lua b/gamemode/player_class/player_zombie.lua
index f8333b1..4167953 100644
--- a/gamemode/player_class/player_zombie.lua
+++ b/gamemode/player_class/player_zombie.lua
@@ -1,29 +1,29 @@
AddCSLuaFile()
-local PLAYER = {}
+local PLAYER = {}
-function PLAYER:UpdateAnimation( velocity, maxseqgroundspeed )
+function PLAYER:UpdateAnimation( velocity, maxseqgroundspeed )
local len = velocity:Length()
local movement = 1.0
if len > 0.2 then
-
- movement = len / maxseqgroundspeed
-
+
+ movement = len / maxseqgroundspeed
+
end
rate = math.min( movement, 2 )
if self.Player:WaterLevel() >= 2 then
-
+
rate = math.max( rate, 0.5 )
-
- elseif !self.Player:IsOnGround() and len >= 1000 then
-
+
+ elseif !self.Player:IsOnGround() and len >= 1000 then
+
rate = 0.1
-
+
end
local weapon = self.Player:GetActiveWeapon()
@@ -31,10 +31,10 @@ function PLAYER:UpdateAnimation( velocity, maxseqgroundspeed )
self.Player:SetPlaybackRate( rate )
if CLIENT then
-
+
self:GrabEarAnimation()
self:MouthMoveAnimation()
-
+
end
end
@@ -45,11 +45,11 @@ function PLAYER:CalcMainActivity( velocity )
self.Player.CalcSeqOverride = self.Player:LookupSequence( "zombie_idle" )
local len2d = velocity:Length2D()
-
+
if len2d > 1 then
-
+
self.Player.CalcSeqOverride = self.Player:LookupSequence( "zombie_run" )
-
+
end
return self.Player.CalcIdeal, self.Player.CalcSeqOverride
@@ -73,7 +73,7 @@ function PLAYER:DoAnimationEvent( event, data )
self.Player.m_bJumping = true
self.Player.m_bFirstJumpFrame = true
self.Player.m_flJumpStartTime = CurTime()
-
+
self.Player:AnimRestartMainSequence()
return ACT_INVALID
@@ -90,4 +90,4 @@ function PLAYER:DoAnimationEvent( event, data )
end
-player_manager.RegisterClass( "player_zombie", PLAYER, "player_base" ) \ No newline at end of file
+player_manager.RegisterClass( "player_zombie", PLAYER, "player_base" )