Merge branch 'respawn-line' into 'master'

Respawn when crossing a line

See merge request KartKrew/Kart!363
This commit is contained in:
Sal 2021-02-05 17:49:50 -05:00
commit 64d6453331
2 changed files with 17 additions and 0 deletions

View file

@ -213,6 +213,7 @@ static boolean P_SpecialIsLinedefCrossType(UINT16 ldspecial)
switch (ldspecial)
{
case 2001: // Finish line
case 2003: // Respawn line
{
linedefcrossspecial = true;
}

View file

@ -2182,6 +2182,20 @@ void P_CrossSpecialLine(line_t *line, INT32 side, mobj_t *thing)
}
break;
case 2003: // Respawn Line
{
/* No Climb: only trigger from front side */
if
(
player->respawn.state == RESPAWNST_NONE &&
(!(line->flags & ML_NOCLIMB) || side == 0)
)
{
P_DamageMobj(player->mo, NULL, NULL, 1, DMG_DEATHPIT);
}
}
break;
default:
{
// Do nothing
@ -6939,6 +6953,8 @@ void P_SpawnSpecials(boolean fromnetsave)
break;
case 2002: // Linedef Trigger: Race Lap
break;
case 2003: // Respawn Line
break;
default:
break;