Fix crash when starting E2L1

git-svn-id: https://svn.eduke32.com/eduke32@7440 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-03-19 22:09:26 +00:00 committed by Christoph Oelckers
parent d869e612e4
commit 21217585c9
2 changed files with 9 additions and 2 deletions

View file

@ -499,11 +499,18 @@ ACTOR_INLINE int A_CheckEnemyTile(int const tileNum)
ACTOR_INLINE int A_SetSprite(int const spriteNum, uint32_t cliptype) ACTOR_INLINE int A_SetSprite(int const spriteNum, uint32_t cliptype)
{ {
vec3_t davect = { (sprite[spriteNum].xvel * (sintable[(sprite[spriteNum].ang + 512) & 2047])) >> 14, vec3_t const davect = { (sprite[spriteNum].xvel * (sintable[(sprite[spriteNum].ang + 512) & 2047])) >> 14,
(sprite[spriteNum].xvel * (sintable[sprite[spriteNum].ang & 2047])) >> 14, sprite[spriteNum].zvel }; (sprite[spriteNum].xvel * (sintable[sprite[spriteNum].ang & 2047])) >> 14, sprite[spriteNum].zvel };
return (A_MoveSprite(spriteNum, &davect, cliptype) == 0); return (A_MoveSprite(spriteNum, &davect, cliptype) == 0);
} }
ACTOR_INLINE int A_SetSpriteNoZ(int const spriteNum, uint32_t cliptype)
{
vec3_t const davect = { (sprite[spriteNum].xvel * (sintable[(sprite[spriteNum].ang + 512) & 2047])) >> 14,
(sprite[spriteNum].xvel * (sintable[sprite[spriteNum].ang & 2047])) >> 14, 0 };
return (A_MoveSprite(spriteNum, &davect, cliptype) == 0);
}
ACTOR_INLINE int32_t A_MoveSprite(int const spriteNum, vec3_t const * const change, uint32_t cliptype) ACTOR_INLINE int32_t A_MoveSprite(int const spriteNum, vec3_t const * const change, uint32_t cliptype)
{ {
return A_MoveSpriteClipdist(spriteNum, change, cliptype, -1); return A_MoveSpriteClipdist(spriteNum, change, cliptype, -1);

View file

@ -415,7 +415,7 @@ void A_GetZLimits(int const spriteNum)
{ {
actor[spriteNum].flags |= SFLAG_NOFLOORSHADOW; // No shadows on actors actor[spriteNum].flags |= SFLAG_NOFLOORSHADOW; // No shadows on actors
pSprite->xvel = -256; // SLIDE_ABOVE_ENEMY pSprite->xvel = -256; // SLIDE_ABOVE_ENEMY
A_SetSprite(spriteNum, CLIPMASK0); A_SetSpriteNoZ(spriteNum, CLIPMASK0);
} }
else if (pSprite->statnum == STAT_PROJECTILE && hitspr->picnum == APLAYER && pSprite->owner==florhit) else if (pSprite->statnum == STAT_PROJECTILE && hitspr->picnum == APLAYER && pSprite->owner==florhit)
{ {