diff --git a/extras/conf/udb/Includes/SRB222_things.cfg b/extras/conf/udb/Includes/SRB222_things.cfg index f1ed572c1..4aa66b87d 100644 --- a/extras/conf/udb/Includes/SRB222_things.cfg +++ b/extras/conf/udb/Includes/SRB222_things.cfg @@ -4680,6 +4680,16 @@ udmf sprite = "FANSA0D0"; width = 16; height = 8; + arg0 + { + title = "Lift height"; + } + arg1 + { + title = "Invisible?"; + type = 11; + enum = "noyes"; + } } 541 { diff --git a/src/p_map.c b/src/p_map.c index 836e75c4e..7caf5eca5 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -492,7 +492,7 @@ static void P_DoFanAndGasJet(mobj_t *spring, mobj_t *object) switch (spring->type) { case MT_FAN: // fan - if (zdist > (spring->health << FRACBITS)) // max z distance determined by health (set by map thing angle) + if (zdist > (spring->health << FRACBITS)) // max z distance determined by health (set by map thing args[0]) break; if (flipval*object->momz >= FixedMul(speed, spring->scale)) // if object's already moving faster than your best, don't bother break; diff --git a/src/p_mobj.c b/src/p_mobj.c index 250935cc5..22a500715 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -12722,7 +12722,7 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean mobj->cusval = mthing->args[0]; break; case MT_FAN: - if (mthing->options & MTF_OBJECTSPECIAL) + if (mthing->args[1]) { P_UnsetThingPosition(mobj); if (sector_list) @@ -12733,8 +12733,8 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean mobj->flags |= MF_NOSECTOR; // this flag basically turns it invisible P_SetThingPosition(mobj); } - if (mthing->angle) - mobj->health = mthing->angle; + if (mthing->args[0]) + mobj->health = mthing->args[0]; else mobj->health = FixedMul(mobj->subsector->sector->ceilingheight - mobj->subsector->sector->floorheight, 3*(FRACUNIT/4)) >> FRACBITS; break; diff --git a/src/p_setup.c b/src/p_setup.c index 1027b92e2..3a7b70b95 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -4990,6 +4990,10 @@ static void P_ConvertBinaryMap(void) if (mapthings[i].options & MTF_AMBUSH) mapthings[i].args[2] |= TMSF_INTANGIBLE; break; + case 540: //Fan + mapthings[i].args[0] = mapthings[i].angle; + mapthings[i].args[1] = !!(mapthings[i].options & MTF_OBJECTSPECIAL); + break; case 555: //Diagonal yellow spring case 556: //Diagonal red spring case 557: //Diagonal blue spring