mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
Transfer flat-based damage (P_PlayerOnSpecialFlat) to 3D floors.
This commit is contained in:
parent
8a428e69b6
commit
221c2d2d82
3 changed files with 17 additions and 9 deletions
|
@ -41,6 +41,7 @@
|
|||
#include "w_wad.h"
|
||||
#include "sc_man.h"
|
||||
#include "g_level.h"
|
||||
#include "p_terrain.h"
|
||||
#include "r_data/colormaps.h"
|
||||
|
||||
#ifdef _3DFLOORS
|
||||
|
@ -341,8 +342,15 @@ void P_PlayerOnSpecial3DFloor(player_t* player)
|
|||
(player->mo->z + player->mo->height) < rover->bottom.plane->ZatPoint(player->mo->x, player->mo->y))
|
||||
continue;
|
||||
}
|
||||
|
||||
if (rover->model->special || rover->model->damage) P_PlayerInSpecialSector(player, rover->model);
|
||||
|
||||
// Apply sector specials
|
||||
if (rover->model->special || rover->model->damage)
|
||||
P_PlayerInSpecialSector(player, rover->model);
|
||||
|
||||
// Apply flat specials (using the ceiling!)
|
||||
P_PlayerOnSpecialFlat(
|
||||
player, TerrainTypes[rover->model->GetTexture(sector_t::ceiling)]);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -718,12 +718,6 @@ void P_GiveSecret(AActor *actor, bool printmessage, bool playsound, int sectornu
|
|||
|
||||
void P_PlayerOnSpecialFlat (player_t *player, int floorType)
|
||||
{
|
||||
if (player->mo->z > player->mo->Sector->floorplane.ZatPoint (
|
||||
player->mo->x, player->mo->y) &&
|
||||
!player->mo->waterlevel)
|
||||
{ // Player is not touching the floor
|
||||
return;
|
||||
}
|
||||
if (Terrains[floorType].DamageAmount &&
|
||||
!(level.time & Terrains[floorType].DamageTimeMask))
|
||||
{
|
||||
|
|
|
@ -2535,7 +2535,13 @@ void P_PlayerThink (player_t *player)
|
|||
{
|
||||
P_PlayerInSpecialSector (player);
|
||||
}
|
||||
P_PlayerOnSpecialFlat (player, P_GetThingFloorType (player->mo));
|
||||
if (player->mo->z <= player->mo->Sector->floorplane.ZatPoint(
|
||||
player->mo->x, player->mo->y) ||
|
||||
player->mo->waterlevel)
|
||||
{
|
||||
// Player must be touching the floor
|
||||
P_PlayerOnSpecialFlat(player, P_GetThingFloorType(player->mo));
|
||||
}
|
||||
if (player->mo->velz <= -player->mo->FallingScreamMinSpeed &&
|
||||
player->mo->velz >= -player->mo->FallingScreamMaxSpeed && !player->morphTics &&
|
||||
player->mo->waterlevel == 0)
|
||||
|
|
Loading…
Reference in a new issue