Add "trigger egg capsule" linedef executor

This commit is contained in:
MascaraSnake 2020-05-03 15:22:13 +02:00
parent 2449c66b78
commit dd50990e85
2 changed files with 49 additions and 0 deletions

View file

@ -2218,6 +2218,13 @@ linedeftypes
prefix = "(462)";
flags8text = "[3] Set delay by backside sector";
}
464
{
title = "Trigger Egg Capsule";
prefix = "(464)";
flags64text = "[6] Don't end level";
}
}
linedefexecmisc
@ -3704,6 +3711,7 @@ thingtypes
width = 8;
height = 16;
sprite = "internal:capsule";
angletext = "Tag";
}
292
{

View file

@ -4010,6 +4010,47 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
}
break;
case 464: // Trigger Egg Capsule
{
thinker_t *th;
mobj_t *mo2;
// Find the center of the Eggtrap and release all the pretty animals!
// The chimps are my friends.. heeheeheheehehee..... - LouisJM
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
{
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
if (mo2->type != MT_EGGTRAP)
continue;
if (!mo2->spawnpoint)
continue;
if (mo2->spawnpoint->angle != line->tag)
continue;
P_KillMobj(mo2, NULL, mo, 0);
}
if (!(line->flags & ML_NOCLIMB))
{
INT32 i;
// Mark all players with the time to exit thingy!
for (i = 0; i < MAXPLAYERS; i++)
{
if (!playeringame[i])
continue;
P_DoPlayerExit(&players[i]);
}
}
}
break;
#ifdef POLYOBJECTS
case 480: // Polyobj_DoorSlide
case 481: // Polyobj_DoorSwing