Re-added sector damage for non-players. (#2773)
* Re-add non-player sector damage. Reimplements SECMF_HURTMONSTERS and SECMF_HARMINAIR. * Fixed 3D floor handling for sector damage. Fixes sector damage to either monsters or players not working on (non-)solid 3D floors.
This commit is contained in:
parent
12c6d1361a
commit
34dc204517
14 changed files with 100 additions and 57 deletions
|
|
@ -1204,15 +1204,6 @@ DEFINE_ACTION_FUNCTION(APlayerPawn, CheckMusicChange)
|
|||
|
||||
void P_CheckEnvironment(player_t *player)
|
||||
{
|
||||
P_PlayerOnSpecial3DFloor(player);
|
||||
P_PlayerInSpecialSector(player);
|
||||
|
||||
if (!player->mo->isAbove(player->mo->Sector->floorplane.ZatPoint(player->mo)) ||
|
||||
player->mo->waterlevel)
|
||||
{
|
||||
// Player must be touching the floor
|
||||
P_PlayerOnSpecialFlat(player, P_GetThingFloorType(player->mo));
|
||||
}
|
||||
if (player->mo->Vel.Z <= -player->mo->FloatVar(NAME_FallingScreamMinSpeed) &&
|
||||
player->mo->Vel.Z >= -player->mo->FloatVar(NAME_FallingScreamMaxSpeed) && player->mo->alternative == nullptr &&
|
||||
player->mo->waterlevel == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue