From e2c05cbbaec9da0ac157c9d331ef95c69aa2ba33 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Tue, 16 Apr 2013 20:08:45 +0000 Subject: [PATCH] Fix A_MoveSprite() wrongly reporting sector hit without z change after r3678. git-svn-id: https://svn.eduke32.com/eduke32@3686 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/include/build.h | 4 ++-- polymer/eduke32/source/actors.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index 668e1378a..142d3019c 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -1078,8 +1078,8 @@ static inline void getzsofslope(int16_t sectnum, int32_t dax, int32_t day, int32 getzsofslopeptr(§or[sectnum], dax, day, ceilz, florz); } -// Is a red wall in a safe fashion, i.e. -// .nextsector >= 0 iff .nextwall >= 0 ? +// Is a red wall in a safe fashion, i.e. only if consistency invariant +// ".nextsector >= 0 iff .nextwall >= 0" holds. static inline int32_t redwallp(const walltype *wal) { return (wal->nextwall >= 0 && wal->nextsector >= 0); diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 069cc8196..792f74bb7 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -524,7 +524,7 @@ int32_t A_MoveSprite(int32_t spritenum, const vec3_t *change, uint32_t cliptype) } #endif } - else if (retval == 0) + else if (change->z != 0 && retval == 0) retval = 16384+dasectnum; if (retval == 16384+dasectnum)