Added character spawning

master v0.1-alpha
AlmTech 5 years ago
parent 0d05cb1dfc
commit d0986a8bac
  1. 2
      gamemode/engine/core/server/sv_player_init.lua
  2. 2
      gamemode/engine/derma/menus/menu_character.lua
  3. 2
      gamemode/engine/lib/server/sv_character.lua

@ -10,7 +10,7 @@ Quantum.Server.Player = {}
local ply = FindMetaTable( "Player" ) local ply = FindMetaTable( "Player" )
function GM:PlayerInitialSpawn( ply ) function GM:PlayerInitialSpawn( ply )
--ply.isloaded = true -- REMOVE THIS WHEN MYSQL DB IS ADDED ply.isloaded = true -- REMOVE THIS WHEN MYSQL DB IS ADDED
-- load in all of the players characters and stuff from the MySQL DB -- load in all of the players characters and stuff from the MySQL DB
end end

@ -500,7 +500,7 @@ function menu.open( dt )
p.enter.DoClick = function() p.enter.DoClick = function()
surface.PlaySound( "UI/buttonclick.wav" ) surface.PlaySound( "UI/buttonclick.wav" )
-- enter world -- -- enter world --
snm.RunNetworkedFunc( "enterWorldChar", {index = selectedChar.index} ) snm.RunNetworkedFunc( "enterWorldChar", {index = selectedChar.index} ) -- FIX CRASH ISSUE ( 0xC00000FD )
end end
p.enter.OnCursorEntered = function() surface.PlaySound( "UI/buttonrollover.wav" ) end p.enter.OnCursorEntered = function() surface.PlaySound( "UI/buttonrollover.wav" ) end
end end

@ -59,7 +59,7 @@ function Quantum.Server.Char.GetCurrentCharacter( pl )
end end
local function setupCharacter( pl, char ) local function setupCharacter( pl, char )
pl:Respawn() pl:Spawn()
pl:SetMaxHealth( char.maxhealth ) pl:SetMaxHealth( char.maxhealth )
pl:SetHealth( char.health ) pl:SetHealth( char.health )
pl:SetModel( char.model ) pl:SetModel( char.model )

Loading…
Cancel
Save