From 986e46555279b97444272695849ce78779bcccb4 Mon Sep 17 00:00:00 2001 From: cypress Date: Tue, 31 Oct 2023 12:29:00 -0400 Subject: [PATCH] SERVER: Fix maps where info_player_start and spawns 2-4 were used --- source/server/entities/spawn_points.qc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/source/server/entities/spawn_points.qc b/source/server/entities/spawn_points.qc index 20df2a9..fd5bef8 100644 --- a/source/server/entities/spawn_points.qc +++ b/source/server/entities/spawn_points.qc @@ -318,15 +318,12 @@ void() Spawns_FillMissing = player_spawns[SPAWN_PLR_LEGACY] = false; } - // Check for maps that only have info_player_start - if (player_spawns[SPAWN_PLR_LEGACY] == true && - player_spawns[SPAWN_PLR_1] == false && - player_spawns[SPAWN_PLR_2] == false && - player_spawns[SPAWN_PLR_3] == false && - player_spawns[SPAWN_PLR_4] == false) { - // info_player_start becomes info_player_1_spawn + // Convert info_player_start to info_player_1_spawn + if (player_spawns[SPAWN_PLR_LEGACY] == true) { spawn_points[SPAWN_PLR_LEGACY].classname = SPAWN_1_CLASS; spawn_points[SPAWN_PLR_1] = spawn_points[SPAWN_PLR_LEGACY]; + player_spawns[SPAWN_PLR_1] = true; + player_spawns[SPAWN_PLR_LEGACY] = false; } // Spawn points 2-4 if they dont exist @@ -334,6 +331,7 @@ void() Spawns_FillMissing = if (player_spawns[i] == false) { spawn_points[i] = spawn(); spawn_points[i].classname = spawn_names[i]; + spawn_points[i].angles = spawn_points[SPAWN_PLR_1].angles; Spawns_SetUpPoint(spawn_points[i]); Spawns_FindViableSpawnSpot(spawn_points[i]); }