2016-02-15 12:40:31 +00:00
|
|
|
#ifndef P_CHECKPOS_H
|
|
|
|
#define P_CHECKPOS_H
|
|
|
|
|
|
|
|
|
|
|
|
//============================================================================
|
|
|
|
//
|
|
|
|
// Used by P_CheckPosition and P_TryMove in place of the original
|
|
|
|
// set of global variables.
|
|
|
|
//
|
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
struct FCheckPosition
|
|
|
|
{
|
|
|
|
// in
|
|
|
|
AActor *thing;
|
|
|
|
fixed_t x;
|
|
|
|
fixed_t y;
|
|
|
|
fixed_t z;
|
|
|
|
|
|
|
|
// out
|
|
|
|
sector_t *sector;
|
2016-03-20 18:52:35 +00:00
|
|
|
double floorz;
|
2016-03-20 12:32:53 +00:00
|
|
|
double ceilingz;
|
2016-02-15 12:40:31 +00:00
|
|
|
fixed_t dropoffz;
|
|
|
|
FTextureID floorpic;
|
|
|
|
int floorterrain;
|
|
|
|
sector_t *floorsector;
|
|
|
|
FTextureID ceilingpic;
|
|
|
|
sector_t *ceilingsector;
|
|
|
|
bool touchmidtex;
|
|
|
|
bool abovemidtex;
|
|
|
|
bool floatok;
|
|
|
|
bool FromPMove;
|
|
|
|
line_t *ceilingline;
|
|
|
|
AActor *stepthing;
|
|
|
|
// [RH] These are used by PIT_CheckThing and P_XYMovement to apply
|
|
|
|
// ripping damage once per tic instead of once per move.
|
|
|
|
bool DoRipping;
|
|
|
|
TMap<AActor*, bool> LastRipped;
|
|
|
|
|
|
|
|
int PushTime;
|
|
|
|
|
|
|
|
FCheckPosition(bool rip=false)
|
|
|
|
{
|
|
|
|
DoRipping = rip;
|
|
|
|
PushTime = 0;
|
|
|
|
FromPMove = false;
|
|
|
|
}
|
2016-03-20 12:32:53 +00:00
|
|
|
|
|
|
|
inline fixed_t _f_ceilingz()
|
|
|
|
{
|
|
|
|
return FLOAT2FIXED(ceilingz);
|
|
|
|
}
|
2016-03-20 18:52:35 +00:00
|
|
|
inline fixed_t _f_floorz()
|
|
|
|
{
|
|
|
|
return FLOAT2FIXED(floorz);
|
|
|
|
}
|
2016-03-20 12:32:53 +00:00
|
|
|
|
2016-02-15 12:40:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|