mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-26 04:30:55 +00:00
Spinning/swinging maces/chains and Particle generators can now use P_FindSpecialLineFromTag!
This commit is contained in:
parent
13cb656f0b
commit
f099782c91
1 changed files with 11 additions and 18 deletions
29
src/p_mobj.c
29
src/p_mobj.c
|
@ -9754,20 +9754,16 @@ void P_SpawnMapThing(mapthing_t *mthing)
|
|||
mobjtype_t macetype = MT_SMALLMACE;
|
||||
boolean firsttime;
|
||||
mobj_t *spawnee;
|
||||
size_t line;
|
||||
INT32 line;
|
||||
const size_t mthingi = (size_t)(mthing - mapthings);
|
||||
|
||||
// Why does P_FindSpecialLineFromTag not work here?!?
|
||||
// Monster Iestyn: tag lists haven't been initialised yet for the map, that's why
|
||||
for (line = 0; line < numlines; line++)
|
||||
{
|
||||
if (lines[line].special == 9 && lines[line].tag == mthing->angle)
|
||||
break;
|
||||
}
|
||||
// Find the corresponding linedef special, using angle as tag
|
||||
// P_FindSpecialLineFromTag works here now =D
|
||||
line = P_FindSpecialLineFromTag(9, mthing->angle, -1);
|
||||
|
||||
if (line == numlines)
|
||||
if (line == -1)
|
||||
{
|
||||
CONS_Debug(DBG_GAMELOGIC, "Mace chain (mapthing #%s) needs tagged to a #9 parameter line (trying to find tag %d).\n", sizeu1(mthingi), mthing->angle);
|
||||
CONS_Debug(DBG_GAMELOGIC, "Mace chain (mapthing #%s) needs to be tagged to a #9 parameter line (trying to find tag %d).\n", sizeu1(mthingi), mthing->angle);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
|
@ -9865,18 +9861,15 @@ ML_NOCLIMB : Direction not controllable
|
|||
fixed_t radius, speed, bottomheight, topheight;
|
||||
INT32 type, numdivisions, time, anglespeed;
|
||||
angle_t angledivision;
|
||||
size_t line;
|
||||
INT32 line;
|
||||
const size_t mthingi = (size_t)(mthing - mapthings);
|
||||
|
||||
for (line = 0; line < numlines; line++)
|
||||
{
|
||||
if (lines[line].special == 15 && lines[line].tag == mthing->angle)
|
||||
break;
|
||||
}
|
||||
// Find the corresponding linedef special, using angle as tag
|
||||
line = P_FindSpecialLineFromTag(15, mthing->angle, -1);
|
||||
|
||||
if (line == numlines)
|
||||
if (line == -1)
|
||||
{
|
||||
CONS_Debug(DBG_GAMELOGIC, "Particle generator (mapthing #%s) needs tagged to a #15 parameter line (trying to find tag %d).\n", sizeu1(mthingi), mthing->angle);
|
||||
CONS_Debug(DBG_GAMELOGIC, "Particle generator (mapthing #%s) needs to be tagged to a #15 parameter line (trying to find tag %d).\n", sizeu1(mthingi), mthing->angle);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue