From 1bfdd54f8179daece5160fa24265d35fd2e041ce Mon Sep 17 00:00:00 2001 From: helixhorned Date: Fri, 20 Feb 2015 22:10:26 +0000 Subject: [PATCH] actors.c: make Enforcers and Troopers avoid ST1 sectors as in Duke3D. That is, resurrect the stayput condition for LIZMAN and non-flying LIZTROOP, but only if changing from a non-ST1 sector. DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@5021 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/actors.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index cc8cb538f..922f8cd35 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -426,10 +426,6 @@ int32_t A_MoveSpriteClipdist(int32_t spritenum, const vec3_t *change, uint32_t c return 0; } - int16_t dasectnum = spr->sectnum; - int32_t daz = spr->z - 2*tilesiz[spr->picnum].y*spr->yrepeat; - const int32_t oldz = spr->z; - if (clipdist >= 0) { // use that value @@ -453,6 +449,11 @@ int32_t A_MoveSpriteClipdist(int32_t spritenum, const vec3_t *change, uint32_t c clipdist = spr->clipdist<<2; } + int16_t dasectnum = spr->sectnum; + const int16_t osectnum = dasectnum; + int32_t daz = spr->z - 2*tilesiz[spr->picnum].y*spr->yrepeat; + const int32_t oldz = spr->z; + // Handle horizontal movement first. spr->z = daz; int32_t retval = clipmove((vec3_t *)spr, &dasectnum, @@ -467,7 +468,8 @@ int32_t A_MoveSpriteClipdist(int32_t spritenum, const vec3_t *change, uint32_t c ((actor[spritenum].actorstayput >= 0 && actor[spritenum].actorstayput != dasectnum) || (spr->picnum == BOSS2 && spr->pal == 0 && sector[dasectnum].lotag != ST_3) || ((spr->picnum == BOSS1 || spr->picnum == BOSS2) && sector[dasectnum].lotag == ST_1_ABOVE_WATER) -// || (sector[dasectnum].lotag == ST_1_ABOVE_WATER && (spr->picnum == LIZMAN || (spr->picnum == LIZTROOP && spr->zvel == 0))) + || (sector[osectnum].lotag != ST_1_ABOVE_WATER && sector[dasectnum].lotag == ST_1_ABOVE_WATER && + (spr->picnum == LIZMAN || (spr->picnum == LIZTROOP && spr->zvel == 0))) ) ) {