mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Fix for E1L1 dumpster fire issue
git-svn-id: https://svn.eduke32.com/eduke32@8636 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
5a13be1f7b
commit
46b62aa6aa
1 changed files with 12 additions and 2 deletions
|
@ -400,7 +400,7 @@ int A_FurthestVisiblePoint(int const spriteNum, uspriteptr_t const ts, vec2_t *
|
||||||
void VM_GetZRange(int const spriteNum, int32_t * const ceilhit, int32_t * const florhit, int const wallDist)
|
void VM_GetZRange(int const spriteNum, int32_t * const ceilhit, int32_t * const florhit, int const wallDist)
|
||||||
{
|
{
|
||||||
auto const pSprite = &sprite[spriteNum];
|
auto const pSprite = &sprite[spriteNum];
|
||||||
int const ocstat = pSprite->cstat;
|
int const ocstat = pSprite->cstat;
|
||||||
|
|
||||||
pSprite->cstat = 0;
|
pSprite->cstat = 0;
|
||||||
pSprite->z -= ZOFFSET;
|
pSprite->z -= ZOFFSET;
|
||||||
|
@ -415,7 +415,8 @@ void A_GetZLimits(int const spriteNum)
|
||||||
{
|
{
|
||||||
auto const pSprite = &sprite[spriteNum];
|
auto const pSprite = &sprite[spriteNum];
|
||||||
int32_t ceilhit, florhit;
|
int32_t ceilhit, florhit;
|
||||||
int const clipDist = A_GetClipdist(spriteNum, -1);
|
int const clipDist = A_GetClipdist(spriteNum, -1);
|
||||||
|
auto const oceilz = actor[spriteNum].ceilingz;
|
||||||
|
|
||||||
VM_GetZRange(spriteNum, &ceilhit, &florhit, pSprite->statnum == STAT_PROJECTILE ? clipDist << 3 : clipDist);
|
VM_GetZRange(spriteNum, &ceilhit, &florhit, pSprite->statnum == STAT_PROJECTILE ? clipDist << 3 : clipDist);
|
||||||
actor[spriteNum].flags &= ~SFLAG_NOFLOORSHADOW;
|
actor[spriteNum].flags &= ~SFLAG_NOFLOORSHADOW;
|
||||||
|
@ -440,6 +441,15 @@ void A_GetZLimits(int const spriteNum)
|
||||||
actor[spriteNum].floorz = sector[pSprite->sectnum].floorz;
|
actor[spriteNum].floorz = sector[pSprite->sectnum].floorz;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// in E1L1, the dumpster fire sprites break after calling this function because the cardboard boxes
|
||||||
|
// are a few units higher than the fire and are detected as the "ceiling"
|
||||||
|
// unfortunately, this trips the "ifgapzl 16 break" in "state firestate"
|
||||||
|
if ((ceilhit&49152) == 49152 && (sprite[ceilhit&(MAXSPRITES-1)].cstat&48) == 0)
|
||||||
|
{
|
||||||
|
if (pSprite->z >= actor[spriteNum].floorz)
|
||||||
|
actor[spriteNum].ceilingz = oceilz;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void A_Fall(int const spriteNum)
|
void A_Fall(int const spriteNum)
|
||||||
|
|
Loading…
Reference in a new issue