This fixes the shrinker in E1L4

I wonder what it breaks! :D

git-svn-id: https://svn.eduke32.com/eduke32@8117 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-09-17 03:21:10 +00:00 committed by Christoph Oelckers
parent e6d72ae2b6
commit 05fae1eb1a

View file

@ -498,25 +498,16 @@ int32_t A_MoveSpriteClipdist(int32_t spriteNum, vec3_t const * const change, uin
int returnValue;
int32_t diffZ;
spriteheightofs(spriteNum, &diffZ, 0);
int newZ = pSprite->z - diffZ;
spriteheightofs(spriteNum, &diffZ, 1);
pSprite->z -= diffZ >> 1;
switch (pSprite->statnum)
if (pSprite->statnum == STAT_PROJECTILE)
returnValue = clipmovex(&pSprite->pos, &newSectnum, change->x << 13, change->y << 13, clipDist, diffZ >> 3, diffZ >> 3, clipType, 1);
else
{
default:
{
returnValue = clipmove(&pSprite->pos, &newSectnum, change->x << 13, change->y << 13, clipDist, ZOFFSET6, ZOFFSET6, clipType);
break;
}
case STAT_PROJECTILE:
{
returnValue = clipmovex(&pSprite->pos, &newSectnum, change->x << 13, change->y << 13, clipDist, diffZ >> 1, diffZ >> 1, clipType, 1);
break;
}
pSprite->z -= diffZ >> 1;
returnValue = clipmove(&pSprite->pos, &newSectnum, change->x << 13, change->y << 13, clipDist, ZOFFSET6, ZOFFSET6, clipType);
pSprite->z += diffZ >> 1;
}
pSprite->z += diffZ >> 1;
// Testing: For some reason the assert below this was tripping for clients
EDUKE32_UNUSED int16_t dbg_ClipMoveSectnum = newSectnum;
@ -565,6 +556,7 @@ int32_t A_MoveSpriteClipdist(int32_t spriteNum, vec3_t const * const change, uin
Bassert(newSectnum == pSprite->sectnum);
int newZ = pSprite->z;
int32_t ceilhit, florhit;
int const doZUpdate = change->z ? A_CheckNeedZUpdate(spriteNum, change->z, &newZ, &ceilhit, &florhit) : 0;