Permalink
Browse files

Don't load new images background when in-game

  • Loading branch information...
robotboy655 committed Feb 6, 2017
1 parent 726bce4 commit 09be9021a836d6de723b8ef19e00fd23afc6823a
Showing with 4 additions and 0 deletions.
  1. +4 −0 garrysmod/lua/menu/background.lua
@@ -84,13 +84,17 @@ local LastGamemode = "none"
function ChangeBackground( currentgm )
if ( IsInGame() ) then return end -- Don't try to load new images while in-game
if ( currentgm && currentgm == LastGamemode ) then return end
if ( currentgm ) then LastGamemode = currentgm end
local img = table.Random( Images )
if ( !img ) then return end
-- Todo: Unload Outgoing.mat from memory
Outgoing = Active
if ( Outgoing ) then
Outgoing.AlphaVel = 255

0 comments on commit 09be902

Please sign in to comment.