mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 15:32:33 +00:00
Adapt flame-related objects to UDMF
This commit is contained in:
parent
720df51b6e
commit
fd3fa9a924
4 changed files with 73 additions and 5 deletions
|
@ -5409,6 +5409,12 @@ udmf
|
|||
sprite = "FLAMA0E0";
|
||||
width = 8;
|
||||
height = 32;
|
||||
arg0
|
||||
{
|
||||
title = "Corona?";
|
||||
type = 11;
|
||||
enum = "noyes";
|
||||
}
|
||||
}
|
||||
1102
|
||||
{
|
||||
|
@ -5798,6 +5804,12 @@ udmf
|
|||
sprite = "CNDLA0";
|
||||
width = 8;
|
||||
height = 48;
|
||||
arg0
|
||||
{
|
||||
title = "Corona?";
|
||||
type = 11;
|
||||
enum = "noyes";
|
||||
}
|
||||
}
|
||||
1120
|
||||
{
|
||||
|
@ -5805,6 +5817,12 @@ udmf
|
|||
sprite = "CNDLB0";
|
||||
width = 8;
|
||||
height = 176;
|
||||
arg0
|
||||
{
|
||||
title = "Corona?";
|
||||
type = 11;
|
||||
enum = "noyes";
|
||||
}
|
||||
}
|
||||
1121
|
||||
{
|
||||
|
@ -5812,6 +5830,16 @@ udmf
|
|||
sprite = "FLMHA0";
|
||||
width = 24;
|
||||
height = 80;
|
||||
arg0
|
||||
{
|
||||
title = "Flags";
|
||||
type = 12;
|
||||
enum
|
||||
{
|
||||
1 = "No flame";
|
||||
2 = "Add corona";
|
||||
}
|
||||
}
|
||||
}
|
||||
1122
|
||||
{
|
||||
|
@ -7045,6 +7073,12 @@ udmf
|
|||
sprite = "PUMKA0";
|
||||
width = 16;
|
||||
height = 40;
|
||||
arg0
|
||||
{
|
||||
title = "Flicker";
|
||||
type = 11;
|
||||
enum = "yesno";
|
||||
}
|
||||
}
|
||||
2007
|
||||
{
|
||||
|
@ -7052,6 +7086,12 @@ udmf
|
|||
sprite = "PUMKB0";
|
||||
width = 16;
|
||||
height = 40;
|
||||
arg0
|
||||
{
|
||||
title = "Flicker";
|
||||
type = 11;
|
||||
enum = "yesno";
|
||||
}
|
||||
}
|
||||
2008
|
||||
{
|
||||
|
@ -7059,6 +7099,12 @@ udmf
|
|||
sprite = "PUMKC0";
|
||||
width = 16;
|
||||
height = 40;
|
||||
arg0
|
||||
{
|
||||
title = "Flicker";
|
||||
type = 11;
|
||||
enum = "yesno";
|
||||
}
|
||||
}
|
||||
2009
|
||||
{
|
||||
|
|
10
src/p_mobj.c
10
src/p_mobj.c
|
@ -12754,7 +12754,7 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
|
|||
mobj->color = ((mthing->angle - 1) % (numskincolors - 1)) + 1;
|
||||
break;
|
||||
case MT_FLAME:
|
||||
if (mthing->options & MTF_EXTRA)
|
||||
if (mthing->args[0])
|
||||
{
|
||||
mobj_t *corona = P_MakeSoftwareCorona(mobj, 20);
|
||||
P_SetScale(corona, (corona->destscale = mobj->scale*3));
|
||||
|
@ -12762,12 +12762,12 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
|
|||
}
|
||||
break;
|
||||
case MT_FLAMEHOLDER:
|
||||
if (!(mthing->options & MTF_OBJECTSPECIAL)) // Spawn the fire
|
||||
if (!(mthing->args[0] & TMFH_NOFLAME)) // Spawn the fire
|
||||
{
|
||||
mobj_t *flame = P_SpawnMobjFromMobj(mobj, 0, 0, mobj->height, MT_FLAME);
|
||||
P_SetTarget(&flame->target, mobj);
|
||||
flame->flags2 |= MF2_BOSSNOTRAP;
|
||||
if (mthing->options & MTF_EXTRA)
|
||||
if (mthing->args[0] & TMFH_CORONA)
|
||||
{
|
||||
mobj_t *corona = P_MakeSoftwareCorona(flame, 20);
|
||||
P_SetScale(corona, (corona->destscale = flame->scale*3));
|
||||
|
@ -12777,13 +12777,13 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
|
|||
break;
|
||||
case MT_CANDLE:
|
||||
case MT_CANDLEPRICKET:
|
||||
if (mthing->options & MTF_EXTRA)
|
||||
if (mthing->args[0])
|
||||
P_MakeSoftwareCorona(mobj, ((mobj->type == MT_CANDLE) ? 42 : 176));
|
||||
break;
|
||||
case MT_JACKO1:
|
||||
case MT_JACKO2:
|
||||
case MT_JACKO3:
|
||||
if (!(mthing->options & MTF_EXTRA)) // take the torch out of the crafting recipe
|
||||
if (!(mthing->args[0])) // take the torch out of the crafting recipe
|
||||
{
|
||||
mobj_t *overlay = P_SpawnMobjFromMobj(mobj, 0, 0, 0, MT_OVERLAY);
|
||||
P_SetTarget(&overlay->target, mobj);
|
||||
|
|
|
@ -5124,6 +5124,17 @@ static void P_ConvertBinaryMap(void)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case 1101: //Torch
|
||||
case 1119: //Candle
|
||||
case 1120: //Candle pricket
|
||||
mapthings[i].args[0] = !!(mapthings[i].options & MTF_EXTRA);
|
||||
break;
|
||||
case 1121: //Flame holder
|
||||
if (mapthings[i].options & MTF_OBJECTSPECIAL)
|
||||
mapthings[i].args[0] |= TMFH_NOFLAME;
|
||||
if (mapthings[i].options & MTF_EXTRA)
|
||||
mapthings[i].args[0] |= TMFH_CORONA;
|
||||
break;
|
||||
case 1202: //Rock spawner
|
||||
{
|
||||
mtag_t tag = (mtag_t)mapthings[i].angle;
|
||||
|
@ -5197,6 +5208,11 @@ static void P_ConvertBinaryMap(void)
|
|||
case 1807: //Axe
|
||||
mapthings[i].args[0] = LE_AXE;
|
||||
break;
|
||||
case 2006: //Jack-o'-lantern 1
|
||||
case 2007: //Jack-o'-lantern 2
|
||||
case 2008: //Jack-o'-lantern 3
|
||||
mapthings[i].args[0] = !!(mapthings[i].options & MTF_EXTRA);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -57,6 +57,12 @@ typedef enum
|
|||
TMFF_HOP = 1<<2,
|
||||
} textmapflickyflags_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMFH_NOFLAME = 1,
|
||||
TMFH_CORONA = 1<<1,
|
||||
} textmapflameholderflags_t;
|
||||
|
||||
//FOF flags
|
||||
typedef enum
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue