mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
Better behaved falling actors
git-svn-id: https://svn.eduke32.com/eduke32@7952 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
49edf5f542
commit
99a3c3393a
1 changed files with 5 additions and 15 deletions
|
@ -439,17 +439,8 @@ void A_Fall(int const spriteNum)
|
||||||
else if (sector[pSprite->sectnum].lotag == ST_2_UNDERWATER || EDUKE32_PREDICT_FALSE(G_CheckForSpaceCeiling(pSprite->sectnum)))
|
else if (sector[pSprite->sectnum].lotag == ST_2_UNDERWATER || EDUKE32_PREDICT_FALSE(G_CheckForSpaceCeiling(pSprite->sectnum)))
|
||||||
spriteGravity = g_spriteGravity/6;
|
spriteGravity = g_spriteGravity/6;
|
||||||
|
|
||||||
if (pSprite->statnum == STAT_ACTOR || pSprite->statnum == STAT_PLAYER || pSprite->statnum == STAT_ZOMBIEACTOR
|
int32_t ceilhit, florhit;
|
||||||
|| pSprite->statnum == STAT_STANDABLE)
|
VM_GetZRange(spriteNum, &ceilhit, &florhit, A_GetClipdist(spriteNum, -1));
|
||||||
{
|
|
||||||
int32_t ceilhit, florhit;
|
|
||||||
VM_GetZRange(spriteNum, &ceilhit, &florhit, 127);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
actor[spriteNum].ceilingz = sector[pSprite->sectnum].ceilingz;
|
|
||||||
actor[spriteNum].floorz = sector[pSprite->sectnum].floorz;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef YAX_ENABLE
|
#ifdef YAX_ENABLE
|
||||||
int fbunch = (sector[pSprite->sectnum].floorstat&512) ? -1 : yax_getbunch(pSprite->sectnum, YAX_FLOOR);
|
int fbunch = (sector[pSprite->sectnum].floorstat&512) ? -1 : yax_getbunch(pSprite->sectnum, YAX_FLOOR);
|
||||||
|
@ -1001,10 +992,9 @@ static void VM_Fall(int const spriteNum, spritetype * const pSprite)
|
||||||
spriteGravity = 0;
|
spriteGravity = 0;
|
||||||
|
|
||||||
if (!actor[spriteNum].cgg-- || (sector[pSprite->sectnum].floorstat&2))
|
if (!actor[spriteNum].cgg-- || (sector[pSprite->sectnum].floorstat&2))
|
||||||
{
|
|
||||||
A_GetZLimits(spriteNum);
|
|
||||||
actor[spriteNum].cgg = 3;
|
actor[spriteNum].cgg = 3;
|
||||||
}
|
|
||||||
|
A_GetZLimits(spriteNum);
|
||||||
|
|
||||||
if (pSprite->z < actor[spriteNum].floorz-ZOFFSET)
|
if (pSprite->z < actor[spriteNum].floorz-ZOFFSET)
|
||||||
{
|
{
|
||||||
|
@ -1057,7 +1047,7 @@ static void VM_Fall(int const spriteNum, spritetype * const pSprite)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sector[pSprite->sectnum].lotag == ST_1_ABOVE_WATER)
|
if (sector[pSprite->sectnum].lotag == ST_1_ABOVE_WATER && actor[spriteNum].floorz == getcorrectflorzofslope(pSprite->sectnum, pSprite->x, pSprite->y))
|
||||||
{
|
{
|
||||||
pSprite->z = newZ + A_GetWaterZOffset(spriteNum);
|
pSprite->z = newZ + A_GetWaterZOffset(spriteNum);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue