Adapt NiGHTS track items to UDMF

This commit is contained in:
MascaraSnake 2021-12-18 10:45:50 +01:00
parent 1a1e5faf08
commit 482c24a1fb
3 changed files with 68 additions and 11 deletions

View file

@ -6010,16 +6010,54 @@ udmf
title = "Axis";
sprite = "internal:axis1";
circle = 1;
arg0
{
title = "Mare";
}
arg1
{
title = "Order";
}
arg2
{
title = "Radius";
}
arg3
{
title = "Direction";
type = 11;
enum
{
0 = "Clockwise";
1 = "Counterclockwise";
}
}
}
1701
{
title = "Axis Transfer";
sprite = "internal:axis2";
arg0
{
title = "Mare";
}
arg1
{
title = "Order";
}
}
1702
{
title = "Axis Transfer Line";
sprite = "internal:axis3";
arg0
{
title = "Mare";
}
arg1
{
title = "Order";
}
}
1710
{
@ -6027,6 +6065,14 @@ udmf
sprite = "CAPSA0";
width = 72;
height = 144;
arg0
{
title = "Mare";
}
arg1
{
title = "Required spheres";
}
}
}

View file

@ -12823,11 +12823,10 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
P_SetMobjState(mobj, mobj->info->spawnstate + mobj->threshold);
break;
case MT_EGGCAPSULE:
if (mthing->angle <= 0)
mthing->angle = 20; // prevent 0 health
mobj->health = mthing->angle;
mobj->threshold = min(mthing->extrainfo, 7);
mobj->threshold = min(mthing->args[0], 7);
mobj->health = mthing->args[1];
if (mobj->health <= 0)
mobj->health = 20; // prevent 0 health
break;
case MT_TUBEWAYPOINT:
{
@ -12940,20 +12939,19 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
return false;
break;
case MT_AXIS:
// Inverted if uppermost bit is set
if (mthing->angle & 16384)
// Inverted if args[3] is set
if (mthing->args[3])
mobj->flags2 |= MF2_AMBUSH;
if (mthing->angle > 0)
mobj->radius = (mthing->angle & 16383) << FRACBITS;
mobj->radius = abs(mthing->args[2]) << FRACBITS;
// FALLTHRU
case MT_AXISTRANSFER:
case MT_AXISTRANSFERLINE:
// Mare it belongs to
mobj->threshold = min(mthing->extrainfo, 7);
mobj->threshold = min(mthing->args[0], 7);
// # in the mare
mobj->health = mthing->options;
mobj->health = mthing->args[1];
mobj->flags2 |= MF2_AXIS;
break;

View file

@ -5017,6 +5017,19 @@ static void P_ConvertBinaryMap(void)
P_WriteConstant(MT_ROCKCRUMBLE1 + (sides[lines[j].sidenum[0]].rowoffset >> FRACBITS), &mapthings[i].stringargs[0]);
break;
}
case 1700: //Axis
mapthings[i].args[2] = mapthings[i].angle & 16383;
mapthings[i].args[3] = !!(mapthings[i].angle & 16384);
/* FALLTHRU */
case 1701: //Axis transfer
case 1702: //Axis transfer line
mapthings[i].args[0] = mapthings[i].extrainfo;
mapthings[i].args[1] = mapthings[i].options;
break;
case 1710: //Ideya capture
mapthings[i].args[0] = mapthings[i].extrainfo;
mapthings[i].args[1] = mapthings[i].angle;
break;
default:
break;
}