diff --git a/extras/conf/udb/Includes/SRB222_things.cfg b/extras/conf/udb/Includes/SRB222_things.cfg index 102805b1b..d0dc85cc5 100644 --- a/extras/conf/udb/Includes/SRB222_things.cfg +++ b/extras/conf/udb/Includes/SRB222_things.cfg @@ -6866,26 +6866,76 @@ udmf { title = "Super Paraloop"; sprite = "NPRUA0"; + arg0 + { + title = "Flags"; + type = 12; + enum + { + 1 = "Bonus time only"; + 2 = "Spawn immediately"; + } + } } 1708 { title = "Drill Refill"; sprite = "NPRUB0"; + arg0 + { + title = "Flags"; + type = 12; + enum + { + 1 = "Bonus time only"; + 2 = "Spawn immediately"; + } + } } 1709 { title = "Nightopian Helper"; sprite = "NPRUC0"; + arg0 + { + title = "Flags"; + type = 12; + enum + { + 1 = "Bonus time only"; + 2 = "Spawn immediately"; + } + } } 1711 { title = "Extra Time"; sprite = "NPRUD0"; + arg0 + { + title = "Flags"; + type = 12; + enum + { + 1 = "Bonus time only"; + 2 = "Spawn immediately"; + } + } } 1712 { title = "Link Freeze"; sprite = "NPRUE0"; + arg0 + { + title = "Flags"; + type = 12; + enum + { + 1 = "Bonus time only"; + 2 = "Spawn immediately"; + } + } } 1713 { diff --git a/src/p_mobj.c b/src/p_mobj.c index aa27c4015..c1d0fb7ac 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -13105,19 +13105,24 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean if (mthing->options & MTF_OBJECTSPECIAL) // No egg trap for this boss mobj->flags2 |= MF2_BOSSNOTRAP; } + if (mobj->flags & MF_NIGHTSITEM) + { + // Requires you to be in bonus time to activate + if (mthing->args[0] & TMNI_BONUSONLY) + mobj->flags2 |= MF2_STRONGBOX; + // Spawn already displayed + if (mthing->args[0] & TMNI_REVEAL) + { + mobj->flags |= MF_SPECIAL; + mobj->flags &= ~MF_NIGHTSITEM; + } + } return true; } static void P_SetAmbush(mobj_t *mobj) { - if (mobj->flags & MF_NIGHTSITEM) - { - // Spawn already displayed - mobj->flags |= MF_SPECIAL; - mobj->flags &= ~MF_NIGHTSITEM; - } - if (mobj->flags & MF_PUSHABLE) mobj->flags &= ~MF_PUSHABLE; @@ -13163,10 +13168,6 @@ static void P_SetObjectSpecial(mobj_t *mobj) mobj->flags2 |= MF2_STRONGBOX; } - // Requires you to be in bonus time to activate - if (mobj->flags & MF_NIGHTSITEM) - mobj->flags2 |= MF2_STRONGBOX; - // Pushables bounce and slide coolly with object special flag set if (mobj->flags & MF_PUSHABLE) { diff --git a/src/p_setup.c b/src/p_setup.c index 8333c21f3..5431b0124 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -4896,6 +4896,13 @@ static void P_ConvertBinaryMap(void) mapthings[i].args[2] = LE_ALLBOSSESDEAD + paramoffset; mapthings[i].args[3] = LE_PINCHPHASE + paramoffset; } + if (mobjinfo[mobjtype].flags & MF_NIGHTSITEM) + { + if (mapthings[i].options & MTF_OBJECTSPECIAL) + mapthings[i].args[0] |= TMNI_BONUSONLY; + if (mapthings[i].options & MTF_AMBUSH) + mapthings[i].args[0] |= TMNI_REVEAL; + } } if (mapthings[i].type >= 1 && mapthings[i].type <= 35) //Player starts diff --git a/src/p_spec.h b/src/p_spec.h index 697a140ea..61ad5d6e4 100644 --- a/src/p_spec.h +++ b/src/p_spec.h @@ -82,6 +82,12 @@ typedef enum TMGD_LEFT = 2, } textmapguarddirection_t; +typedef enum +{ + TMNI_BONUSONLY = 1, + TMNI_REVEAL = 1<<1, +} textmapnightsitem_t; + //FOF flags typedef enum {