mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
Add getcorrectzsofslope()
git-svn-id: https://svn.eduke32.com/eduke32@7822 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
2bb93967e1
commit
2482cddbb5
1 changed files with 21 additions and 0 deletions
|
@ -1242,6 +1242,27 @@ static FORCE_INLINE void getzsofslope(int16_t sectnum, int32_t dax, int32_t day,
|
|||
getzsofslopeptr((usectorptr_t)§or[sectnum], dax, day, ceilz, florz);
|
||||
}
|
||||
|
||||
static FORCE_INLINE void getcorrectzsofslope(int16_t sectnum, int32_t dax, int32_t day, int32_t *ceilz, int32_t *florz)
|
||||
{
|
||||
vec2_t closest = { dax, day };
|
||||
getsectordist(closest, sectnum, &closest);
|
||||
getzsofslopeptr((usectorptr_t)§or[sectnum], closest.x, closest.y, ceilz, florz);
|
||||
}
|
||||
|
||||
static FORCE_INLINE int32_t getcorrectceilzofslope(int16_t sectnum, int32_t dax, int32_t day)
|
||||
{
|
||||
vec2_t closest = { dax, day };
|
||||
getsectordist(closest, sectnum, &closest);
|
||||
return getceilzofslopeptr((usectorptr_t)§or[sectnum], closest.x, closest.y);
|
||||
}
|
||||
|
||||
static FORCE_INLINE int32_t getcorrectflorzofslope(int16_t sectnum, int32_t dax, int32_t day)
|
||||
{
|
||||
vec2_t closest = { dax, day };
|
||||
getsectordist(closest, sectnum, &closest);
|
||||
return getflorzofslopeptr((usectorptr_t)§or[sectnum], closest.x, closest.y);
|
||||
}
|
||||
|
||||
// Is <wal> a red wall in a safe fashion, i.e. only if consistency invariant
|
||||
// ".nextsector >= 0 iff .nextwall >= 0" holds.
|
||||
static FORCE_INLINE CONSTEXPR int32_t redwallp(uwallptr_t wal)
|
||||
|
|
Loading…
Reference in a new issue