mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-30 21:20:54 +00:00
Allow starpost Parameter to dictate order
This commit is contained in:
parent
c7ab065b0a
commit
1e2a4c2cce
2 changed files with 12 additions and 3 deletions
|
@ -1441,8 +1441,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We could technically have 91.1 Star Posts. 90 is cleaner.
|
// With the parameter + angle setup, we can go up to 1365 star posts. Who needs that many?
|
||||||
if (special->health > 90)
|
if (special->health > 1365)
|
||||||
{
|
{
|
||||||
CONS_Debug(DBG_GAMELOGIC, "Bad Starpost Number!\n");
|
CONS_Debug(DBG_GAMELOGIC, "Bad Starpost Number!\n");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -12911,6 +12911,15 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
|
||||||
thinker_t* th;
|
thinker_t* th;
|
||||||
mobj_t* mo2;
|
mobj_t* mo2;
|
||||||
boolean foundanother = false;
|
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->angle/360) + 1;
|
||||||
|
|
||||||
// See if other starposts exist in this level that have the same value.
|
// See if other starposts exist in this level that have the same value.
|
||||||
|
|
Loading…
Reference in a new issue