mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-20 01:43:50 +00:00
Adapt star posts to UDMF
This commit is contained in:
parent
af30847a1f
commit
693fa7ba81
3 changed files with 16 additions and 9 deletions
|
@ -4370,6 +4370,10 @@ udmf
|
|||
sprite = "STPTA0M0";
|
||||
width = 64;
|
||||
height = 128;
|
||||
arg0
|
||||
{
|
||||
title = "Order";
|
||||
}
|
||||
}
|
||||
520
|
||||
{
|
||||
|
|
10
src/p_mobj.c
10
src/p_mobj.c
|
@ -12966,15 +12966,7 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
|
|||
mobj_t* mo2;
|
||||
boolean foundanother = false;
|
||||
|
||||
if (mthing->extrainfo)
|
||||
// Allow thing Parameter to define star post num too!
|
||||
// For starposts above param 15 (the 16th), add 360 to the angle like before and start parameter from 1 (NOT 0)!
|
||||
// So the 16th starpost is angle=0 param=15, the 17th would be angle=360 param=1.
|
||||
// This seems more intuitive for mappers to use until UDMF is ready, since most SP maps won't have over 16 consecutive star posts.
|
||||
mobj->health = mthing->extrainfo + (mthing->angle/360)*15 + 1;
|
||||
else
|
||||
// Old behavior if Parameter is 0; add 360 to the angle for each consecutive star post.
|
||||
mobj->health = (mthing->angle/360) + 1;
|
||||
mobj->health = mthing->args[0] + 1;
|
||||
|
||||
// See if other starposts exist in this level that have the same value.
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
|
|
|
@ -4890,6 +4890,17 @@ static void P_ConvertBinaryMap(void)
|
|||
case 111: //Pop-up Turret
|
||||
mapthings[i].args[0] = mapthings[i].angle;
|
||||
break;
|
||||
case 502: //Star post
|
||||
if (mapthings[i].extrainfo)
|
||||
// Allow thing Parameter to define star post num too!
|
||||
// For starposts above param 15 (the 16th), add 360 to the angle like before and start parameter from 1 (NOT 0)!
|
||||
// So the 16th starpost is angle=0 param=15, the 17th would be angle=360 param=1.
|
||||
// This seems more intuitive for mappers to use, since most SP maps won't have over 16 consecutive star posts.
|
||||
mapthings[i].args[0] = mapthings[i].extrainfo + (mapthings[i].angle/360) * 15;
|
||||
else
|
||||
// Old behavior if Parameter is 0; add 360 to the angle for each consecutive star post.
|
||||
mapthings[i].args[0] = (mapthings[i].angle/360);
|
||||
break;
|
||||
case 753: //Zoom tube waypoint
|
||||
mapthings[i].args[0] = mapthings[i].angle >> 8;
|
||||
mapthings[i].args[1] = mapthings[i].angle & 255;
|
||||
|
|
Loading…
Reference in a new issue