Removed QRender & bug fixes

master
AlmTech Software 5 years ago
parent 64e2adc7b3
commit 0ea7dce7b6
  1. 3
      gamemode/engine/derma/cl_menu.lua
  2. 37
      gamemode/engine/derma/lib/cl_render.lua
  3. 42
      gamemode/engine/derma/menus/menu_character.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

@ -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

@ -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

Loading…
Cancel
Save