From c18ae15dc5837a6a76eb60c5ec36d912c606313a Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 8 Feb 2015 18:48:31 +0000 Subject: [PATCH] gameexec.c: in VM_Move(), update actor[].{floor,ceiling}z for enemies. Previously, that was the case only with DRONE and COMMANDER. This makes non-falling enemies pass properly through TROR bunches. git-svn-id: https://svn.eduke32.com/eduke32@4975 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/gameexec.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 1c5811477..6532e98cf 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -788,18 +788,21 @@ dead: } else if (vm.g_sp->picnum != ORGANTIC) { - // All other actors besides ORGANTIC don't update .floorz or - // .ceilingz here. + int32_t l; + + // In Duke3D, all other actors don't update .floorz or + // .ceilingz here. In EDuke32, they do. + if (vm.g_sp->zvel > 0) { - if (vm.g_sp->z > actor[vm.g_i].floorz) - vm.g_sp->z = actor[vm.g_i].floorz; + actor[vm.g_i].floorz = l = VM_GetFlorZOfSlope(); + if (vm.g_sp->z > l) + vm.g_sp->z = l; vm.g_sp->z += A_GetWaterZOffset(vm.g_i); } else if (vm.g_sp->zvel < 0) { - const int32_t l = VM_GetCeilZOfSlope(); - + actor[vm.g_i].ceilingz = l = VM_GetCeilZOfSlope(); if (vm.g_sp->z < l+(66<<8)) { vm.g_sp->z = l+(66<<8);