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);