diff --git a/gamemode/engine/core/server/sv_player_init.lua b/gamemode/engine/core/server/sv_player_init.lua index 9a12be9..f386f0b 100644 --- a/gamemode/engine/core/server/sv_player_init.lua +++ b/gamemode/engine/core/server/sv_player_init.lua @@ -58,7 +58,7 @@ function GM:PlayerSpawn( ply ) ply:UnSpectate() setUpPlayer( ply ) else - ply:SetPos( Vector( -8936.411133, 8244.439453, 7744.031250 ) ) + ply:SetPos( Vector( 0, 0, 0 ) ) Quantum.Net.OpenMenu( ply, "main", { chars = Quantum.Server.Char.GetPlayerChars_cl( ply ) } ) -- make the player open the main menu end else diff --git a/gamemode/engine/derma/cl_menu.lua b/gamemode/engine/derma/cl_menu.lua index 296a018..477f471 100644 --- a/gamemode/engine/derma/cl_menu.lua +++ b/gamemode/engine/derma/cl_menu.lua @@ -14,7 +14,8 @@ 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" + ["iteminfo"] = GM.FolderName .. "/gamemode/engine/derma/lib/cl_menu_iteminfo.lua", + ["qrender"] = GM.FolderName .. "/gamemode/engine/derma/lib/cl_render.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 new file mode 100644 index 0000000..6969657 --- /dev/null +++ b/gamemode/engine/derma/lib/cl_render.lua @@ -0,0 +1,20 @@ +-- __ _ _______ _ __ +-- / / /\ | | |__ __| | | \ \ +-- / / / \ | |_ __ ___ | | ___ ___| |__ \ \ +-- < < / /\ \ | | '_ ` _ \| |/ _ \/ __| '_ \ > > +-- \ \ / ____ \| | | | | | | | __/ (__| | | | / / +-- \_\ /_/ \_\_|_| |_| |_|_|\___|\___|_| |_| /_/ + +local qrender = {} + +function qrender.model( mdl, vec, ang ) + + render.Model( { + model = mdl, + pos = vec, + angle = ang + } ) + +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 1d15d50..b7290e1 100644 --- a/gamemode/engine/derma/menus/menu_character.lua +++ b/gamemode/engine/derma/menus/menu_character.lua @@ -11,6 +11,7 @@ local snm = Quantum.Client.Menu.GetAPI( "net" ) local page = Quantum.Client.Menu.GetAPI( "page" ) local theme = Quantum.Client.Menu.GetAPI( "theme" ) local fade = Quantum.Client.Menu.GetAPI( "fade" ) +local qrender = Quantum.Client.Menu.GetAPI( "qrender" ) local resScale = Quantum.Client.ResolutionScale local sw, sh = ScrW(), ScrH() @@ -77,6 +78,19 @@ local function runIntroCinematic( parent, char ) end end +local modelLocations = { + ["rp_dunwood_eu"] = { + ["charselect"] = { + pos = Vector( -7553.9194335938, 13563.834960938, 256.03125 ), + ang = Angle( 46.707160949707, -47.234722137451, 0 ) + }, + ["charcreate"] = { + pos = Vector( -7553.9194335938, 13563.834960938, 256.03125 ), + ang = Angle( 46.707160949707, -47.234722137451, 0 ) + } + } +} + local pages = { charCreate = function( parent ) local pW, pH = parent:GetSize() @@ -307,18 +321,23 @@ local pages = { --- Model viewer - 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 ) + 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 ) + end mdl.Think = function( self ) - --getClassModels(inputs.class) if( self:GetModel() ~= getMaxModel( getClassModels(inputs.class)[inputs.gender], inputs.modelIndex ) ) then - self:SetModel( getMaxModel( getClassModels(inputs.class)[inputs.gender], inputs.modelIndex ) ) + if( ( modelLocations[ game.GetMap() ] != nil ) ) then + qrender.model( getMaxModel( getClassModels(inputs.class)[inputs.gender], inputs.modelIndex ) ) + else + self:SetModel( getMaxModel( getClassModels(inputs.class)[inputs.gender], inputs.modelIndex ) ) + end end end diff --git a/gamemode/engine/derma/menus/menu_intro.lua b/gamemode/engine/derma/menus/menu_intro.lua index 1bcbfd9..cfc8bdf 100644 --- a/gamemode/engine/derma/menus/menu_intro.lua +++ b/gamemode/engine/derma/menus/menu_intro.lua @@ -69,6 +69,65 @@ local scenes = { ang1 = Angle( 8.131199, -77.082695, 0.000000 ), ang2 = Angle( 0.422407, -89.520081, 0.000000 ) } + }, + + ["rp_dunwood_eu"] = { + [1] = { + fov = 80, + velocity = 12, + pos1 = Vector( 3900.0373535156, -3459.8254394531, 1928.1319580078 ), + pos2 = Vector( 4706.26953125, -4947.5844726563, 1841.9495849609 ), + ang1 = Angle( 4.5935039520264, -33.771461486816, 0 ), + ang2 = Angle( 3.0622990131378, -4.2035503387451, 0 ) + }, + [2] = { + fov = 70, + velocity = 12, + pos1 = Vector( 3029.4631347656, 1975.4969482422, 323.03317260742 ), + pos2 = Vector( 2984.1782226563, 1293.4967041016, 266.60958862305 ), + ang1 = Angle( 2.5343189239502, -101.2608795166, 0 ), + ang2 = Angle( 0.95032584667206, -131.14338684082, 0 ) + }, + [3] = { + fov = 70, + velocity = 12, + pos1 = Vector( 763.47644042969, 45.709754943848, 320.53189086914 ), + pos2 = Vector( 746.17907714844, 4470.6206054688, 341.65856933594 ), + ang1 = Angle( -0.03213819861412, 90.368942260742, 0 ), + ang2 = Angle( -0.29613819718361, 90.210556030273, 0 ) + }, + [4] = { + fov = 70, + velocity = 12, + pos1 = Vector( -1109.5668945313, 3873.0493164063, 3774.078125 ), + pos2 = Vector( -1102.1696777344, 4070.5539550781, 3973.8828125 ), + ang1 = Angle( -36.716876983643, 146.30101013184, 0 ), + ang2 = Angle( -46.009662628174, -143.79263305664, 0 ) + }, + [5] = { + fov = 60, + velocity = 16, + pos1 = Vector( -9168.173828125, 3501.13671875, 8610.853515625 ), + pos2 = Vector( -10148.767578125, -4350.7163085938, 1860.8051757813 ), + ang1 = Angle( 48.132801055908, -50.447017669678, 0 ), + ang2 = Angle( 21.969816207886, -154.96385192871, 0 ) + }, + [6] = { + fov = 60, + velocity = 15, + pos1 = Vector( 3114.608887, -13817.962891, 82.778885 ), + pos2 = Vector( 5247.718262, -14413.496094, 74.946350 ), + ang1 = Angle( 0.844603, -15.770578, 0.000000 ), + ang2 = Angle( 2.006202, 37.927032, 0.000000 ) + }, + [7] = { + fov = 60, + velocity = 14, + pos1 = Vector( 4964.591797, 4514.272461, 213.532272 ), + pos2 = Vector( 5047.838379, 3216.407959, 128.219254 ), + ang1 = Angle( 8.131199, -77.082695, 0.000000 ), + ang2 = Angle( 0.422407, -89.520081, 0.000000 ) + } } } diff --git a/gamemode/engine/derma/menus/menu_main.lua b/gamemode/engine/derma/menus/menu_main.lua index baf3598..0689ffb 100644 --- a/gamemode/engine/derma/menus/menu_main.lua +++ b/gamemode/engine/derma/menus/menu_main.lua @@ -44,6 +44,26 @@ local scenes = { ang1 = Angle( 7.180876, 118.805817, 0.000000 ) } } + }, + -- + + ["rp_dunwood_eu"] = { + [1] = { + [1] = { + fov = 60, + velocity = 1, + pos1 = Vector( -8481.490234375, 10434.901367188, 161.60014343262 ), + ang1 = Angle( 13.865054130554, 112.71305084229, 0 ) + } + }, + [2] = { + [1] = { + fov = 80, + velocity = 1, + pos1 = Vector( 3845.0456542969, 10594.700195313, 1220.03125 ), + ang1 = Angle( -43.528274536133, -141.58242797852, 0 ) + } + } } } @@ -73,11 +93,12 @@ function main.open(dt) f.Paint = function( self ) theme.renderblur( self, 2, 7 ) end - f.OnClose = function( self ) - --Quantum.Client.Menu.Menus["character"].open( dt ) - end - Quantum.Client.Cam.Start( scenes[ game.GetMap() ][math.random( 1, table.Count(scenes[ game.GetMap() ])) ], false ) + if( scenes[ game.GetMap() ] != nil ) then + Quantum.Client.Cam.Start( scenes[ game.GetMap() ][math.random( 1, table.Count(scenes[ game.GetMap() ])) ], false ) + else + Quantum.Error( "There are no scenes for this map! Aborting scene..." ) + end local version = vgui.Create( "DLabel", f ) version:SetText( "Quantum Version: " .. Quantum.Version ) @@ -95,6 +116,9 @@ function main.open(dt) title.w, title.h = title:GetSize() title:SetPos( sw/2 - title.w/2, sh/5 - title.h/2 ) title.x, title.y = title:GetPos() + title.Paint = function( self ) + theme.blurpanel( self, Color( 0, 0, 0, 150 ) ) + end local sub = vgui.Create( "DLabel", f ) sub:SetText( "Run by Quantum, created by AlmTech" ) @@ -102,8 +126,11 @@ function main.open(dt) sub:SetTextColor( Color( 255, 255, 255, 150 ) ) sub:SizeToContents() sub.w, sub.h = sub:GetSize() - sub:SetPos( sw/2 - sub.w/2, title.y + sub.h + padding*2.25 ) + sub:SetPos( sw/2 - sub.w/2, title.y + sub.h + padding*2.45 ) sub.x, sub.y = sub:GetPos() + sub.Paint = function( self ) + theme.blurpanel( self, Color( 0, 0, 0, 90 ) ) + end ---- BUTTONS ---- diff --git a/gamemode/engine/lib/client/cl_cinematic.lua b/gamemode/engine/lib/client/cl_cinematic.lua index 1f0ad42..e617160 100644 --- a/gamemode/engine/lib/client/cl_cinematic.lua +++ b/gamemode/engine/lib/client/cl_cinematic.lua @@ -15,6 +15,11 @@ function Quantum.Client.Cam.Stop() end function Quantum.Client.Cam.Start( scene, loop ) + if( scene == nil ) then + Quantum.Error( "Scene does not exist! Aborting..." ) + return + end + local frac = 0 local time -- speed of the camera ( how long till it reaches its finish point ) local fov diff --git a/gamemode/settings/sv_settings.lua b/gamemode/settings/sv_settings.lua index c5fc142..741fd08 100644 --- a/gamemode/settings/sv_settings.lua +++ b/gamemode/settings/sv_settings.lua @@ -20,15 +20,22 @@ Quantum.Server.Settings.ItemDespawnTimer = 300 Quantum.Server.Settings.ItemPickupSound = "physics/cardboard/cardboard_box_impact_hard2.wav" Quantum.Server.Settings.InitSpawnLocation = { - pos = Vector( 5054.682617, 3152.809326, 168.031250 ), - ang = Angle( 3.009660, 89.639153, 0.000000 ) + pos = Vector( 12418.626953125, 9959.9345703125, 320.03125 ), + ang = Angle( 0, -2.1179277896881, 0 ) } Quantum.Server.Settings.SpawnLocations = { ["rp_truenorth_v1a_livin"] = { ["Hospital"] = { pos = Vector( 13526.426758, 13088.842773, 125.031250 ), ang = Angle( 1, -115, 0 ) }, + ["Lake"] = { pos = Vector( 10812, -8319, 5382 ), ang = Angle( 5, -40, 0 ) } + }, + + ["rp_dunwood_eu"] = { + ["Hospital"] = { pos = Vector( -5102.2807617188, 10812.857421875, 256.03125 ), ang = Angle( 0, 40.045780181885, 0 ) }, + + ["Graveyard"] = { pos = Vector( 6220.7700195313, -12982.192382813, 248 ), ang = Angle( 0, -136.18241882324, 0 ) } } } @@ -106,7 +113,9 @@ Quantum.Server.Settings.IdlePainSounds.Female = { --- Features to be added --- Quantum.Server.Settings.MaxJobLevel = 250 -Quantum.Server.Settings.MaxJobSlots = 2 +Quantum.Server.Settings.MaxJobSlots = Vector( 12418.626953125, 9959.9345703125, 320.03125 ) +Angle( 65.102394104004, -2.1179277896881, 0 ) + Quantum.Server.Settings.MaxSkillLevel = 100