From 3205b6d83a1b01b64eebaea2f6ce05c6594ef8e3 Mon Sep 17 00:00:00 2001 From: MascaraSnake <jonassauer27@gmail.com> Date: Tue, 21 Dec 2021 08:01:51 +0100 Subject: [PATCH] Adapt player starts to UDMF --- extras/conf/udb/Includes/SRB222_things.cfg | 210 +++++++++++++++++++++ src/p_mobj.c | 4 +- src/p_setup.c | 6 + 3 files changed, 218 insertions(+), 2 deletions(-) diff --git a/extras/conf/udb/Includes/SRB222_things.cfg b/extras/conf/udb/Includes/SRB222_things.cfg index 0efe006fb..8ae317d89 100644 --- a/extras/conf/udb/Includes/SRB222_things.cfg +++ b/extras/conf/udb/Includes/SRB222_things.cfg @@ -3187,176 +3187,386 @@ udmf { title = "Player 01 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 2 { title = "Player 02 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 3 { title = "Player 03 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 4 { title = "Player 04 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 5 { title = "Player 05 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 6 { title = "Player 06 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 7 { title = "Player 07 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 8 { title = "Player 08 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 9 { title = "Player 09 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 10 { title = "Player 10 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 11 { title = "Player 11 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 12 { title = "Player 12 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 13 { title = "Player 13 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 14 { title = "Player 14 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 15 { title = "Player 15 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 16 { title = "Player 16 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 17 { title = "Player 17 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 18 { title = "Player 18 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 19 { title = "Player 19 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 20 { title = "Player 20 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 21 { title = "Player 21 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 22 { title = "Player 22 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 23 { title = "Player 23 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 24 { title = "Player 24 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 25 { title = "Player 25 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 26 { title = "Player 26 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 27 { title = "Player 27 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 28 { title = "Player 28 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 29 { title = "Player 29 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 30 { title = "Player 30 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 31 { title = "Player 31 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 32 { title = "Player 32 Start"; sprite = "PLAYA0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 33 { title = "Match Start"; sprite = "NDRNA2A8"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 34 { title = "CTF Red Team Start"; sprite = "SIGNG0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } 35 { title = "CTF Blue Team Start"; sprite = "SIGNE0"; + arg0 + { + title = "Spawn on ceiling?"; + type = 11; + enum = "noyes"; + } } } diff --git a/src/p_mobj.c b/src/p_mobj.c index beed59e8f..c673f3971 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -11643,9 +11643,9 @@ void P_MovePlayerToSpawn(INT32 playernum, mapthing_t *mthing) { fixed_t offset = mthing->z << FRACBITS; - // Flagging a player's ambush will make them start on the ceiling + // Setting the spawnpoint's args[0] will make the player start on the ceiling // Objectflip inverts - if (!!(mthing->options & MTF_AMBUSH) ^ !!(mthing->options & MTF_OBJECTFLIP)) + if (!!(mthing->args[0]) ^ !!(mthing->options & MTF_OBJECTFLIP)) z = ceilingspawn - offset; else z = floor + offset; diff --git a/src/p_setup.c b/src/p_setup.c index 46b47100c..fc47c4573 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -4871,6 +4871,12 @@ static void P_ConvertBinaryMap(void) for (i = 0; i < nummapthings; i++) { + if (mapthings[i].type >= 1 && mapthings[i].type <= 35) + { + mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH); + continue; + } + switch (mapthings[i].type) { case 110: //THZ Turret -- GitLab