From d70a44c366d87c0e7fed7db1ee6952b35e34cda2 Mon Sep 17 00:00:00 2001 From: AlmTech Software Date: Thu, 5 Dec 2019 20:29:08 +0100 Subject: [PATCH] Bug fixes --- gamemode/engine/derma/cl_menu.lua | 4 ++-- gamemode/engine/derma/menus/menu_character.lua | 2 +- gamemode/engine/derma/menus/menu_intro.lua | 3 +-- gamemode/engine/derma/menus/menu_main.lua | 2 -- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/gamemode/engine/derma/cl_menu.lua b/gamemode/engine/derma/cl_menu.lua index 0f4ff60..6bc5976 100644 --- a/gamemode/engine/derma/cl_menu.lua +++ b/gamemode/engine/derma/cl_menu.lua @@ -23,13 +23,13 @@ local function getMenuIDbyFileName( file ) end Quantum.Client.Menu.Load = function() - local files = file.Find( GAMEMODE.FolderName .. "/gamemode/engine/derma/menus/menu_*.lua", "LUA" ) + local files = file.Find( GM.FolderName .. "/gamemode/engine/derma/menus/menu_*.lua", "LUA" ) Quantum.Debug("Loading menus...") if( !files == nil || #files <= 0 ) then Quantum.Error( "Failed to load menus! Menu files not found. Contact someone important!\nFiles: " .. tostring(files) .. " (" .. tostring(#files) .. ")" ) end for i, file in pairs( files ) do -- pretty ineffective but this will only be run ONCE to load all of the menus local id = getMenuIDbyFileName( file ) -- get the menu id by removing ".lua" and "menu_" from it - Quantum.Client.Menu.Menus[id] = include( GAMEMODE.FolderName .. "/gamemode/engine/derma/menus/" .. file ) -- put it into the table + Quantum.Client.Menu.Menus[id] = include( GM.FolderName .. "/gamemode/engine/derma/menus/" .. file ) -- put it into the table Quantum.Debug( "Loaded menu: '" .. tostring(id) .. "'" ) -- debug it end end diff --git a/gamemode/engine/derma/menus/menu_character.lua b/gamemode/engine/derma/menus/menu_character.lua index 3b1af67..408a426 100644 --- a/gamemode/engine/derma/menus/menu_character.lua +++ b/gamemode/engine/derma/menus/menu_character.lua @@ -643,7 +643,7 @@ function menu.open( dt ) f:Close() -- close the frame -- Open the intro cinematic - runIntroCinematic( Quantum.Client.selectedChar ) -- run the cinematic if it is the first time + runIntroCinematic( Quantum.Client.selectedChar.char ) -- run the cinematic if it is the first time -- else do nothing end diff --git a/gamemode/engine/derma/menus/menu_intro.lua b/gamemode/engine/derma/menus/menu_intro.lua index 230011c..dc1cba2 100644 --- a/gamemode/engine/derma/menus/menu_intro.lua +++ b/gamemode/engine/derma/menus/menu_intro.lua @@ -72,8 +72,7 @@ local scenes = { -- 5031.821777 3866.334961 120.090790;setang 0.898059 56.421352 } -function intro.open( dt ) - local chars = dt.cont +function intro.open() local resScale = Quantum.Client.ResolutionScale local sw, sh = ScrW(), ScrH() local padding = 10 * resScale diff --git a/gamemode/engine/derma/menus/menu_main.lua b/gamemode/engine/derma/menus/menu_main.lua index 181ea94..b82e746 100644 --- a/gamemode/engine/derma/menus/menu_main.lua +++ b/gamemode/engine/derma/menus/menu_main.lua @@ -72,8 +72,6 @@ function main.open(dt) theme.renderblur( self, 2, 7 ) end f.OnClose = function( self ) - --Quantum.Client.IsInMenu = false - --Quantum.Client.Cam.Stop() Quantum.Client.Menu.Menus["character"].open( dt ) end