Skip to content

Commit

Permalink
insta-death sector type 4096
Browse files Browse the repository at this point in the history
monsters and players
gibs
  • Loading branch information
jmtd committed Jul 17, 2017
1 parent c7c4b2e commit e81c447
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
18 changes: 18 additions & 0 deletions prboom2/src/p_map.c
Expand Up @@ -835,6 +835,22 @@ dboolean P_CheckPosition (mobj_t* thing,fixed_t x,fixed_t y)
}


static void CheckForInstaDeath(mobj_t* thing)
{
struct msecnode_s* ms;
sector_t *s;

for(ms = thing->touching_sectorlist; ms; ms = ms->m_tnext)
{
s = ms->m_sector;
if(s->special == 4096 && s->floorheight >= thing->floorz)
{
P_DamageMobj(thing, NULL, NULL, 4*thing->health); // gib
return;
}
}
}

//
// P_TryMove
// Attempt to move to a new position,
Expand Down Expand Up @@ -959,6 +975,8 @@ dboolean P_TryMove(mobj_t* thing,fixed_t x,fixed_t y,
P_CrossSpecialLine(spechit[numspechit], oldside, thing, false);
}

CheckForInstaDeath(thing);

return true;
}

Expand Down
5 changes: 5 additions & 0 deletions prboom2/src/p_spec.c
Expand Up @@ -2379,6 +2379,11 @@ void P_PlayerInSpecialSector (player_t* player)
G_ExitLevel();
break;

case 4096:
// BOOM++ insta-death
P_DamageMobj(player->mo, NULL, NULL, 999);
break;

default:
//jff 1/24/98 Don't exit as DOOM2 did, just ignore
break;
Expand Down

0 comments on commit e81c447

Please sign in to comment.