diff --git a/gamemode/engine/derma/cl_menu.lua b/gamemode/engine/derma/cl_menu.lua index 477f471..296a018 100644 --- a/gamemode/engine/derma/cl_menu.lua +++ b/gamemode/engine/derma/cl_menu.lua @@ -14,8 +14,7 @@ local libs = { ["dialogue"] = GM.FolderName .. "/gamemode/engine/derma/lib/cl_menu_dialogueBox.lua", ["sure"] = GM.FolderName .. "/gamemode/engine/derma/lib/cl_menu_areusure.lua", ["fade"] = GM.FolderName .. "/gamemode/engine/derma/lib/cl_menu_fade.lua", - ["iteminfo"] = GM.FolderName .. "/gamemode/engine/derma/lib/cl_menu_iteminfo.lua", - ["qrender"] = GM.FolderName .. "/gamemode/engine/derma/lib/cl_render.lua" + ["iteminfo"] = GM.FolderName .. "/gamemode/engine/derma/lib/cl_menu_iteminfo.lua" } Quantum.Client.Menu.GetAPI = function( lib ) return include( libs[lib] ) end diff --git a/gamemode/engine/derma/lib/cl_render.lua b/gamemode/engine/derma/lib/cl_render.lua deleted file mode 100644 index 03cc2e3..0000000 --- a/gamemode/engine/derma/lib/cl_render.lua +++ /dev/null @@ -1,37 +0,0 @@ --- __ _ _______ _ __ --- / / /\ | | |__ __| | | \ \ --- / / / \ | |_ __ ___ | | ___ ___| |__ \ \ --- < < / /\ \ | | '_ ` _ \| |/ _ \/ __| '_ \ > > --- \ \ / ____ \| | | | | | | | __/ (__| | | | / / --- \_\ /_/ \_\_|_| |_| |_|_|\___|\___|_| |_| /_/ - -local qrender = {} - -function qrender.CreateMdl( mdl, vec, ang ) - - Quantum.Debug( "CSEnt created." ) - - local ent = ClientsideModel( mdl ) - ent:SetPos( vec ) - ent:SetAngles( ang ) - - return ent - -end - -function qrender.SetModel( ent, model ) - if( ent:GetModel() != model ) then - ent:SetModel( model ) - else - return - end -end - -function qrender.delCSent( ent ) - if( IsValid(ent) ) then - Quantum.Debug( "CSEnt removed." ) - ent:Remove() - end -end - -return qrender \ No newline at end of file diff --git a/gamemode/engine/derma/menus/menu_character.lua b/gamemode/engine/derma/menus/menu_character.lua index 50312ed..55d4b9a 100644 --- a/gamemode/engine/derma/menus/menu_character.lua +++ b/gamemode/engine/derma/menus/menu_character.lua @@ -78,19 +78,6 @@ local function runIntroCinematic( parent, char ) end end -local modelLocations = { - -- ["rp_dunwood_eu"] = { - -- ["charselect"] = { - -- pos = Vector( -7553.9194335938, 13563.834960938, 256.03125 ), - -- ang = Angle( 0, -47.234722137451, 0 ) - -- }, - -- ["charcreate"] = { - -- pos = Vector( -7553.9194335938, 13563.834960938, 256.03125 ), - -- ang = Angle( 0, -47.234722137451, 0 ) - -- } - -- } -} - local pages = { charCreate = function( parent ) local pW, pH = parent:GetSize() @@ -329,28 +316,17 @@ local pages = { --- Model viewer - if( modelLocations[ game.GetMap() ] == nil ) then - mdl:SetModel( Quantum.Models.Player.Citizen.Male[math.random(1, #Quantum.Models.Player.Citizen.Male)] ) -- set the char model - local minv, maxv = mdl.Entity:GetRenderBounds() - local ent = mdl.Entity - local eyepos = ent:GetBonePosition( ent:LookupBone( "ValveBiped.Bip01_Head1" ) ) - eyepos:Add( Vector( 40, 0, -15 ) ) - mdl:SetCamPos( eyepos - Vector( -10, 0, -2 ) ) - mdl:SetLookAt( eyepos ) - else - mdl.csent = qrender.CreateMdl( getMaxModel( getClassModels(inputs.class)[inputs.gender], inputs.modelIndex ), modelLocations[ game.GetMap() ]["charselect"].pos, modelLocations[ game.GetMap() ]["charselect"].ang ) - end - mdl.OnRemove = function() - qrender.delCSent( mdl.csent ) - end + mdl:SetModel( Quantum.Models.Player.Citizen.Male[math.random(1, #Quantum.Models.Player.Citizen.Male)] ) -- set the char model + local minv, maxv = mdl.Entity:GetRenderBounds() + local ent = mdl.Entity + local eyepos = ent:GetBonePosition( ent:LookupBone( "ValveBiped.Bip01_Head1" ) ) + eyepos:Add( Vector( 40, 0, -15 ) ) + mdl:SetCamPos( eyepos - Vector( -10, 0, -2 ) ) + mdl:SetLookAt( eyepos ) mdl.Think = function( self ) - if( self:GetModel() ~= getMaxModel( getClassModels(inputs.class)[inputs.gender], inputs.modelIndex ) ) then - if( ( modelLocations[ game.GetMap() ] != nil && self.csent != nil ) ) then - qrender.SetModel( self.csent, getMaxModel( getClassModels(inputs.class)[inputs.gender], inputs.modelIndex ) ) - else - self:SetModel( getMaxModel( getClassModels(inputs.class)[inputs.gender], inputs.modelIndex ) ) - end + if( self:GetModel() != getMaxModel( getClassModels(inputs.class)[inputs.gender], inputs.modelIndex ) ) then + self:SetModel( getMaxModel( getClassModels(inputs.class)[inputs.gender], inputs.modelIndex ) ) end end