Skip to content

Commit

Permalink
Merge pull request #573 from robotboy655/machinima
Browse files Browse the repository at this point in the history
Machinima-friendly changes
  • Loading branch information
garrynewman committed Jan 21, 2014
2 parents ebdb94f + 2366ebf commit f1c5eb8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions garrysmod/gamemodes/base/entities/entities/prop_effect.lua
@@ -1,6 +1,10 @@

AddCSLuaFile()

if ( CLIENT ) then
CreateConVar( "cl_draweffectrings", "1", 0, "Should the effect green rings be visible?" )
end

ENT.Type = "anim"

ENT.PrintName = ""
Expand Down Expand Up @@ -70,6 +74,8 @@ end
Name: Draw
-----------------------------------------------------------]]
function ENT:Draw()
if ( GetConVarNumber( "cl_draweffectrings" ) == 0 ) then return end
-- Don't draw the grip if there's no chance of us picking it up
local ply = LocalPlayer()
Expand Down
2 changes: 2 additions & 0 deletions garrysmod/gamemodes/base/gamemode/cl_deathnotice.lua
Expand Up @@ -192,6 +192,8 @@ end
function GM:DrawDeathNotice( x, y )
if ( GetConVarNumber( "cl_drawhud" ) == 0 ) then return end
local hud_deathnotice_time = hud_deathnotice_time:GetFloat()
x = x * ScrW()
Expand Down
Expand Up @@ -91,6 +91,8 @@ end

function ENT:Draw()

if ( self.ShouldDraw == 0 ) then return end

BaseClass.Draw( self )

end
Expand Down
6 changes: 4 additions & 2 deletions garrysmod/lua/autorun/menubar/display_options.lua
Expand Up @@ -8,10 +8,13 @@ hook.Add( "PopulateMenuBar", "DisplayOptions_MenuBar", function( menubar )

m:AddSpacer()

m:AddCVar( "Draw HUD", "cl_drawhud", "1", "0" )
m:AddCVar( "Draw Freeze", "effects_freeze", "1", "0" )
m:AddCVar( "Draw Cameras", "cl_drawcameras", "1", "0" )
m:AddCVar( "Draw Unfreeze", "effects_unfreeze", "1", "0" )
m:AddCVar( "Draw Thrusters", "cl_drawthrusterseffects", "1", "0" )
m:AddCVar( "Draw Cameras", "cl_drawcameras", "1", "0" )
m:AddCVar( "Draw Toolgun Help", "gmod_drawhelp", "1", "0" )
m:AddCVar( "Draw Effect Rings", "cl_draweffectrings", "1", "0" )
m:AddCVar( "Draw Spawn Effect", "cl_drawspawneffect", "1", "0" )
m:AddCVar( "Draw World Tooltips", "cl_drawworldtooltips", "1", "0" )

Expand All @@ -31,4 +34,3 @@ hook.Add( "PopulateMenuBar", "DisplayOptions_MenuBar", function( menubar )
m:AddCVar( "Hints", "cl_showhints", "1", "0" )

end )

0 comments on commit f1c5eb8

Please sign in to comment.