mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
Don't squish the player in lotag 1 sectors that have a SE7.
git-svn-id: https://svn.eduke32.com/eduke32@5657 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
0dda248b3f
commit
9c927bcb36
3 changed files with 17 additions and 15 deletions
|
@ -330,7 +330,7 @@ static int32_t Proj_MaybeDoTransport(int32_t spritenum, const tspritetype * cons
|
|||
|
||||
// Check whether sprite <s> is on/in a non-SE7 water sector.
|
||||
// <othersectptr>: if not NULL, the sector on the other side.
|
||||
static int32_t A_CheckNoSE7Water(const spritetype *s, int32_t sectnum, int32_t slotag, int32_t *othersectptr)
|
||||
int32_t A_CheckNoSE7Water(const spritetype *s, int32_t sectnum, int32_t slotag, int32_t *othersectptr)
|
||||
{
|
||||
if (slotag==ST_1_ABOVE_WATER || slotag==ST_2_UNDERWATER)
|
||||
{
|
||||
|
|
|
@ -301,6 +301,7 @@ extern projectile_t SpriteProjectile[MAXSPRITES];
|
|||
|
||||
|
||||
void A_AddToDeleteQueue(int32_t i);
|
||||
int32_t A_CheckNoSE7Water(const spritetype *s, int32_t sectnum, int32_t slotag, int32_t *othersectptr);
|
||||
int32_t A_CheckSwitchTile(int32_t i);
|
||||
void A_DeleteSprite(int32_t s);
|
||||
void A_DoGuts(int32_t sp,int32_t gtype,int32_t n);
|
||||
|
|
|
@ -239,26 +239,27 @@ static int32_t VM_CheckSquished(void)
|
|||
{
|
||||
sectortype const * const sc = §or[vm.g_sp->sectnum];
|
||||
|
||||
if (sc->lotag == ST_23_SWINGING_DOOR || EDUKE32_PREDICT_FALSE(vm.g_sp->picnum == APLAYER && ud.noclip))
|
||||
if (sc->lotag == ST_23_SWINGING_DOOR ||
|
||||
(sc->lotag == ST_1_ABOVE_WATER && !A_CheckNoSE7Water(vm.g_sp, vm.g_sp->sectnum, sc->lotag, NULL)) ||
|
||||
(vm.g_sp->picnum == APLAYER && ud.noclip))
|
||||
return 0;
|
||||
|
||||
{
|
||||
int32_t fz=sc->floorz, cz=sc->ceilingz;
|
||||
int32_t fz=sc->floorz, cz=sc->ceilingz;
|
||||
#ifdef YAX_ENABLE
|
||||
int16_t cb, fb;
|
||||
int16_t cb, fb;
|
||||
|
||||
yax_getbunches(vm.g_sp->sectnum, &cb, &fb);
|
||||
if (cb >= 0 && (sc->ceilingstat&512)==0) // if ceiling non-blocking...
|
||||
cz -= (32<<8); // unconditionally don't squish... yax_getneighborsect is slowish :/
|
||||
if (fb >= 0 && (sc->floorstat&512)==0)
|
||||
fz += (32<<8);
|
||||
yax_getbunches(vm.g_sp->sectnum, &cb, &fb);
|
||||
|
||||
if (cb >= 0 && (sc->ceilingstat&512)==0) // if ceiling non-blocking...
|
||||
cz -= (32<<8); // unconditionally don't squish... yax_getneighborsect is slowish :/
|
||||
if (fb >= 0 && (sc->floorstat&512)==0)
|
||||
fz += (32<<8);
|
||||
#endif
|
||||
|
||||
if (vm.g_sp->pal == 1 ?
|
||||
(fz - cz >= (32<<8) || (sc->lotag&32768)) :
|
||||
(fz - cz >= (12<<8)))
|
||||
return 0;
|
||||
}
|
||||
if (vm.g_sp->pal == 1 ?
|
||||
(fz - cz >= (32<<8) || (sc->lotag&32768)) :
|
||||
(fz - cz >= (12<<8)))
|
||||
return 0;
|
||||
|
||||
P_DoQuote(QUOTE_SQUISHED, vm.g_pp);
|
||||
|
||||
|
|
Loading…
Reference in a new issue