From 0d7e9fc69102a7e87679b71fa71b11514bfa3fe0 Mon Sep 17 00:00:00 2001 From: NepDisk <16447892+NepDisk@users.noreply.github.com> Date: Fri, 13 Sep 2024 22:49:39 -0400 Subject: [PATCH] Fix balloon coloring --- src/p_mobj.c | 5 ++++- src/p_setup.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 5dd2cba39..2545eff2c 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -12037,8 +12037,11 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean mobj->health = FixedMul(mobj->subsector->sector->ceilingheight - mobj->subsector->sector->floorheight, 3*(FRACUNIT/4)) >> FRACBITS; break; case MT_BALLOON: - if (mthing->stringargs[0]) + if (mthing->args[1]) + mobj->color = mthing->args[1]; + else if (mthing->stringargs[0]) mobj->color = get_number(mthing->stringargs[0]); + if (mthing->args[0]) mobj->flags2 |= MF2_AMBUSH; break; diff --git a/src/p_setup.c b/src/p_setup.c index b6fb4b461..d51d3fd4a 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -6621,11 +6621,11 @@ static void P_ConvertBinaryThingTypes(void) mapthings[i].args[2] = !(mapthings[i].options & (MTF_AMBUSH|MTF_OBJECTSPECIAL)); break; case 462: //Balloon + mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH); if (mapthings[i].angle > 0) { - P_WriteSkincolor(((mapthings[i].angle - 1) % (numskincolors - 1)) + 1, &mapthings[i].stringargs[0]); + mapthings[i].args[1] = (1 + (mapthings[i].angle % (numskincolors-1))); } - mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH); break; case 500: //Air bubble patch mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH);