Fixed major bug that crashed the server

master
AlmTech 5 years ago
parent 2d25c23b1e
commit d86384e40b
  1. 6
      gamemode/engine/core/server/sv_player_init.lua
  2. 1
      gamemode/engine/derma/menus/menu_character.lua

@ -10,14 +10,11 @@ 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 = false -- 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
local function setUpPlayer( ply ) local function setUpPlayer( ply )
Quantum.Server.Char.SetCurrentCharacter( ply, ply.charindex || 1 )
if( ply:GetModel() ~= nil ) then if( ply:GetModel() ~= nil ) then
ply:SetupHands() ply:SetupHands()
else else
@ -30,7 +27,6 @@ function GM:PlayerSpawn( ply )
if( !ply.isloaded ) then if( !ply.isloaded ) then
ply:Spectate( OBS_MODE_FIXED ) ply:Spectate( OBS_MODE_FIXED )
-- set cinematic view here
Quantum.Net.OpenMenu( ply, "character", Quantum.Server.Char.GetPlayerChars( ply ) ) Quantum.Net.OpenMenu( ply, "character", Quantum.Server.Char.GetPlayerChars( ply ) )
else else
ply:UnSpectate() ply:UnSpectate()

@ -520,6 +520,7 @@ function menu.open( dt )
-- enter world -- -- enter world --
local dt = { index = selectedChar.index } local dt = { index = selectedChar.index }
snm.RunNetworkedFunc( "enterWorldChar", dt ) -- FIX CRASH ISSUE ( 0xC00000FD ) snm.RunNetworkedFunc( "enterWorldChar", dt ) -- FIX CRASH ISSUE ( 0xC00000FD )
f:Close() -- close the frame
end end
p.enter.OnCursorEntered = function() surface.PlaySound( "UI/buttonrollover.wav" ) end p.enter.OnCursorEntered = function() surface.PlaySound( "UI/buttonrollover.wav" ) end
end end

Loading…
Cancel
Save