summaryrefslogtreecommitdiff
path: root/gamemode/cl_init.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-06-25 18:18:21 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-06-25 18:18:21 -0400
commitbc4b0dbf3c305c42a6c0fa5bda492b8a786353a8 (patch)
treee1670a476a1ecc356f26fed065f2b30982ba8493 /gamemode/cl_init.lua
parent8d5d033446327e32a845e02d58e3d05103d5d867 (diff)
downloadredead-bc4b0dbf3c305c42a6c0fa5bda492b8a786353a8.tar.gz
redead-bc4b0dbf3c305c42a6c0fa5bda492b8a786353a8.tar.bz2
redead-bc4b0dbf3c305c42a6c0fa5bda492b8a786353a8.zip
Fixed client-side error on scientist npc's
Diffstat (limited to 'gamemode/cl_init.lua')
-rw-r--r--gamemode/cl_init.lua52
1 files changed, 26 insertions, 26 deletions
diff --git a/gamemode/cl_init.lua b/gamemode/cl_init.lua
index 1933025..0a6b5d5 100644
--- a/gamemode/cl_init.lua
+++ b/gamemode/cl_init.lua
@@ -66,10 +66,10 @@ function GM:Initialize()
surface.CreateFont ( "AmmoFontSmall", { size = 12, weight = 300, antialias = true, additive = true, font = "Verdana" } )
surface.CreateFont ( "TargetIDFont", { size = 12, weight = 200, antialias = true, additive = true, font = "Verdana" } )
- //matRadar = Material( "radbox/radar" )
- //matArm = Material( "radbox/radar_arm" )
- //matArrow = Material( "radbox/radar_arrow" )
- //matNoise = Material( "radbox/nvg_noise" )
+ --matRadar = Material( "radbox/radar" )
+ --matArm = Material( "radbox/radar_arm" )
+ --matArrow = Material( "radbox/radar_arrow" )
+ --matNoise = Material( "radbox/nvg_noise" )
matHealth = Material( "radbox/img_health" )
matStamina = Material( "radbox/img_stamina" )
@@ -95,7 +95,7 @@ function GM:GetHelpHTML()
end
-// Help menu - comment this out later?
+-- Help menu - comment this out later?
function GM:ShowHelp()
if IsValid( self.HelpFrame ) then return end
@@ -156,7 +156,7 @@ function GM:Think()
GAMEMODE:FadeRagdolls()
GAMEMODE:GoreRagdolls()
GAMEMODE:HUDTraces()
- //GAMEMODE:SpawnRagdolls()
+ --GAMEMODE:SpawnRagdolls()
if GetGlobalBool( "GameOver", false ) and not EndScreenShown then
@@ -172,7 +172,7 @@ function GM:Think()
StartMenuShown = true
GAMEMODE:ShowClasses()
- //player_manager.SetPlayerClass( LocalPlayer(), "player_base" )
+ --player_manager.SetPlayerClass( LocalPlayer(), "player_base" )
end
@@ -184,7 +184,7 @@ function GM:Think()
end
- if LocalPlayer():Team() != TEAM_ARMY then return end
+ if LocalPlayer():Team() ~= TEAM_ARMY then return end
if LocalPlayer():Alive() and HeartBeat < CurTime() and ( LocalPlayer():GetNWBool( "Bleeding", false ) or LocalPlayer():Health() < 50 ) then
@@ -237,7 +237,7 @@ function GM:Think()
local close = math.sqrt( diff.x * diff.x + diff.y * diff.y ) < MaxDist * FadeDist
- if ( !v:IsPlayer() or ( v:Alive() and ( v != LocalPlayer() and ( v:Team() == LocalPlayer():Team() or close ) ) ) ) and !IsOnRadar( v ) and ( dot > 0.99 or close ) then
+ if ( notv:IsPlayer() or ( v:Alive() and ( v ~= LocalPlayer() and ( v:Team() == LocalPlayer():Team() or close ) ) ) ) and notIsOnRadar( v ) and ( dot > 0.99 or close ) then
local pos = v:GetPos()
local color = Color( 0, 255, 0 )
@@ -264,7 +264,7 @@ function GM:Think()
end
- elseif v:IsPlayer() and v:Team() != LocalPlayer():Team() then
+ elseif v:IsPlayer() and v:Team() ~= LocalPlayer():Team() then
color = Color( 255, 80, 80 )
@@ -292,19 +292,19 @@ function GM:FadeRagdolls()
if v.Time and v.Time < CurTime() then
- //v:SetColor( Color( 255, 255, 255, v.Alpha ) )
- //v.Alpha = math.Approach( v.Alpha, 0, -2 )
+ --v:SetColor( Color( 255, 255, 255, v.Alpha ) )
+ --v.Alpha = math.Approach( v.Alpha, 0, -2 )
- //if v.Alpha <= 0 then
- //v:Remove()
- //end
+ --if v.Alpha <= 0 then
+ --v:Remove()
+ --end
v:Remove()
elseif not v.Time then
v.Time = CurTime() + 12
- //v.Alpha = 255
+ --v.Alpha = 255
end
@@ -758,7 +758,7 @@ function GM:HUDPaint()
GAMEMODE:HUDDrawTargetID()
- if not LocalPlayer():Alive() and LocalPlayer():Team() != TEAM_UNASSIGNED then
+ if not LocalPlayer():Alive() and LocalPlayer():Team() ~= TEAM_UNASSIGNED then
DeathScreenScale = math.Approach( DeathScreenScale, 1, FrameTime() * 0.3 )
@@ -785,7 +785,7 @@ function GM:HUDPaint()
end
- if not LocalPlayer():Alive() or LocalPlayer():Team() == TEAM_UNASSIGNED then return end //or GAMEMODE:ElementsVisible() then return end
+ if not LocalPlayer():Alive() or LocalPlayer():Team() == TEAM_UNASSIGNED then return end --or GAMEMODE:ElementsVisible() then return end
GAMEMODE:DrawMarkers()
@@ -815,7 +815,7 @@ function GM:HUDPaint()
local ylen = 55
local ypos = 35
- if IsValid( LocalPlayer():GetActiveWeapon() ) and ( LocalPlayer():GetActiveWeapon().AmmoType or "SMG" ) != "Knife" then
+ if IsValid( LocalPlayer():GetActiveWeapon() ) and ( LocalPlayer():GetActiveWeapon().AmmoType or "SMG" ) ~= "Knife" then
local total = LocalPlayer():GetNWInt( "Ammo" .. ( LocalPlayer():GetActiveWeapon().AmmoType or "SMG" ), 0 )
local ammo = math.Clamp( LocalPlayer():GetActiveWeapon():Clip1(), 0, total )
@@ -859,7 +859,7 @@ function GM:HUDPaint()
end
- if v.DieTime != -1 then
+ if v.DieTime ~= -1 then
alpha = 100 * ( math.Clamp( v.DieTime - CurTime(), 0, BlipTime ) / BlipTime )
@@ -871,7 +871,7 @@ function GM:HUDPaint()
if math.sqrt( diff.x * diff.x + diff.y * diff.y ) > MaxDist * FadeDist and v.DieTime == -1 then
- PosTable[k].DieTime = CurTime() + 1.5 // Remove the dot because they left our inner circle
+ PosTable[k].DieTime = CurTime() + 1.5 -- Remove the dot because they left our inner circle
end
@@ -893,7 +893,7 @@ function GM:HUDPaint()
for k,v in pairs( PosTable ) do
- if v.DieTime != -1 and v.DieTime < CurTime() then
+ if v.DieTime ~= -1 and v.DieTime < CurTime() then
table.remove( PosTable, k )
@@ -907,7 +907,7 @@ function GM:HUDPaint()
local ent = LocalPlayer():GetDTEntity( 0 )
- if IsValid( ent ) or StaticPos != Vector(0,0,0) then
+ if IsValid( ent ) or StaticPos ~= Vector(0,0,0) then
local ang = Angle(0,0,0)
@@ -925,7 +925,7 @@ function GM:HUDPaint()
end
- if StaticPos != Vector(0,0,0) then
+ if StaticPos ~= Vector(0,0,0) then
ang = ( StaticPos - LocalPlayer():GetShootPos()):Angle() - LocalPlayer():GetForward():Angle()
@@ -985,7 +985,7 @@ function GM:CreateMove( cmd )
local ang = cmd:GetViewAngles()
- if ang.r != 0 then
+ if ang.r ~= 0 then
ang.r = 0
cmd:SetViewAngles( ang )
@@ -1035,7 +1035,7 @@ function GM:CreateMove( cmd )
local ang = cmd:GetViewAngles()
- if ViewWobble > 0 or ang.r != 0 then
+ if ViewWobble > 0 or ang.r ~= 0 then
ang.p = ang.p + math.sin( CurTime() ) * ViewWobble
ang.y = ang.y + math.cos( CurTime() ) * ViewWobble