From cb0cdc69e383c9fe681c582203840866ca66275e Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Sat, 21 Mar 2020 15:49:06 +0100 Subject: [PATCH] Fixed spawning bug --- gamemode/engine/core/server/sv_player_spawning.lua | 3 ++- gamemode/settings/sv_settings.lua | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gamemode/engine/core/server/sv_player_spawning.lua b/gamemode/engine/core/server/sv_player_spawning.lua index 5cf68ed..9444883 100644 --- a/gamemode/engine/core/server/sv_player_spawning.lua +++ b/gamemode/engine/core/server/sv_player_spawning.lua @@ -11,7 +11,8 @@ end) local function getNearestSpawn( pl ) local spawnposdist = {} - for id, spawnpoint in pairs( Quantum.Server.Settings.SpawnLocations[ game.GetMap() ] ) do + if( !Quantum.Server.Settings.SpawnLocations[string.lower(game.GetMap())] ) then return Vector(0,0,0), Angle(0,0,0) end + for id, spawnpoint in pairs( Quantum.Server.Settings.SpawnLocations[string.lower(game.GetMap())] ) do spawnposdist[id] = { dist = spawnpoint.pos:Distance( pl.deathpos ), spawnpos = spawnpoint.pos, angle = spawnpoint.ang } end diff --git a/gamemode/settings/sv_settings.lua b/gamemode/settings/sv_settings.lua index d6cfc0b..e837995 100644 --- a/gamemode/settings/sv_settings.lua +++ b/gamemode/settings/sv_settings.lua @@ -40,7 +40,7 @@ Quantum.Server.Settings.SpawnLocations = { ["Graveyard"] = { pos = Vector( 6220.7700195313, -12982.192382813, 248 ), ang = Angle( 0, -136.18241882324, 0 ) } }, - ["RP_SouthSide"] = { + ["rp_southside_day"] = { ["Hospital"] = { pos = Vector( 7586.4912109375, 5226.1508789063, 7.6475238800049 ), ang = Angle( 0, -127.80423736572, 0 ) } }