mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-26 05:41:20 +00:00
SERVER: Fix maps where info_player_start and spawns 2-4 were used
This commit is contained in:
parent
4341005d18
commit
986e465552
1 changed files with 5 additions and 7 deletions
|
@ -318,15 +318,12 @@ void() Spawns_FillMissing =
|
||||||
player_spawns[SPAWN_PLR_LEGACY] = false;
|
player_spawns[SPAWN_PLR_LEGACY] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for maps that only have info_player_start
|
// Convert info_player_start to info_player_1_spawn
|
||||||
if (player_spawns[SPAWN_PLR_LEGACY] == true &&
|
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
|
|
||||||
spawn_points[SPAWN_PLR_LEGACY].classname = SPAWN_1_CLASS;
|
spawn_points[SPAWN_PLR_LEGACY].classname = SPAWN_1_CLASS;
|
||||||
spawn_points[SPAWN_PLR_1] = spawn_points[SPAWN_PLR_LEGACY];
|
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
|
// Spawn points 2-4 if they dont exist
|
||||||
|
@ -334,6 +331,7 @@ void() Spawns_FillMissing =
|
||||||
if (player_spawns[i] == false) {
|
if (player_spawns[i] == false) {
|
||||||
spawn_points[i] = spawn();
|
spawn_points[i] = spawn();
|
||||||
spawn_points[i].classname = spawn_names[i];
|
spawn_points[i].classname = spawn_names[i];
|
||||||
|
spawn_points[i].angles = spawn_points[SPAWN_PLR_1].angles;
|
||||||
Spawns_SetUpPoint(spawn_points[i]);
|
Spawns_SetUpPoint(spawn_points[i]);
|
||||||
Spawns_FindViableSpawnSpot(spawn_points[i]);
|
Spawns_FindViableSpawnSpot(spawn_points[i]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue