From 9815d40c2034be1630f129ebfdd5ce282dbb2e2a Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Wed, 20 Apr 2022 20:06:08 +0200 Subject: [PATCH] Adapt tutorial plant to UDMF --- extras/conf/udb/Includes/SRB222_things.cfg | 32 ++++++++++++++++++++++ src/p_mobj.c | 6 ++-- src/p_setup.c | 3 ++ 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/extras/conf/udb/Includes/SRB222_things.cfg b/extras/conf/udb/Includes/SRB222_things.cfg index c5a881c5c..53d70647b 100644 --- a/extras/conf/udb/Includes/SRB222_things.cfg +++ b/extras/conf/udb/Includes/SRB222_things.cfg @@ -3044,6 +3044,20 @@ doom } } + tutorial + { + color = 10; // Green + title = "Tutorial"; + + 799 + { + title = "Tutorial Plant"; + sprite = "TUPFH0"; + width = 40; + height = 144; + } + } + flickies { color = 10; // Green @@ -7867,6 +7881,24 @@ udmf } } + tutorial + { + color = 10; // Green + title = "Tutorial"; + + 799 + { + title = "Tutorial Plant"; + sprite = "TUPFH0"; + width = 40; + height = 144; + arg0 + { + title = "Start frame"; + } + } + } + flickies { color = 10; // Green diff --git a/src/p_mobj.c b/src/p_mobj.c index ea53395ed..9056f5a3f 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -12922,15 +12922,15 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean { segment = P_SpawnMobjFromMobj(mobj, 0, 0, 0, MT_TUTORIALLEAF); segment->angle = mobj->angle + FixedAngle(i*60*FRACUNIT); - P_SetMobjState(segment, S_TUTORIALLEAF1 + mthing->extrainfo); + P_SetMobjState(segment, S_TUTORIALLEAF1 + mthing->args[0]); } for (i = 0; i < 3; i++) { segment = P_SpawnMobjFromMobj(mobj, 0, 0, 112*FRACUNIT, MT_TUTORIALFLOWER); segment->angle = mobj->angle + FixedAngle(i*120*FRACUNIT); - P_SetMobjState(segment, S_TUTORIALFLOWER1 + mthing->extrainfo); + P_SetMobjState(segment, S_TUTORIALFLOWER1 + mthing->args[0]); } - P_SetMobjState(P_SpawnMobjFromMobj(mobj, 0, 0, 112*FRACUNIT, MT_TUTORIALFLOWERF), S_TUTORIALFLOWERF1 + mthing->extrainfo); + P_SetMobjState(P_SpawnMobjFromMobj(mobj, 0, 0, 112*FRACUNIT, MT_TUTORIALFLOWERF), S_TUTORIALFLOWERF1 + mthing->args[0]); } break; case MT_CEZPOLE1: diff --git a/src/p_setup.c b/src/p_setup.c index 45c5cc3b3..89e7175bc 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -5262,6 +5262,9 @@ static void P_ConvertBinaryMap(void) case 780: //Skybox mapthings[i].args[0] = !!(mapthings[i].options & MTF_OBJECTSPECIAL); break; + case 799: //Tutorial plant + mapthings[i].args[0] = mapthings[i].extrainfo; + break; case 1002: //Dripping water mapthings[i].args[0] = mapthings[i].angle; break;