Correct thinko with the ceiling/floor movement code. When moving more than one

sector c/f and moving one of them would go beyond the other side (ceilingz >
floorz), don't move any sector c/f at all. When moving only one sector in that
case, move so that ceilingz == floorz.

git-svn-id: https://svn.eduke32.com/eduke32@2112 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-11-11 22:39:56 +00:00
parent b7834f21dd
commit 5623334283
1 changed files with 2 additions and 2 deletions

View File

@ -5902,9 +5902,9 @@ static void Keys3d(void)
// (ceiling if floor and vice versa)
if (moveCeilings && (dz > 0) && sector[sect].ceilingz+dz > sector[sect].floorz)
dz = (k<=1) ? 0 : min(sector[sect].floorz - sector[sect].ceilingz, dz);
dz = (k > 1) ? 0 : min(sector[sect].floorz - sector[sect].ceilingz, dz);
else if (moveFloors && (dz < 0) && sector[sect].floorz+dz < sector[sect].ceilingz)
dz = (k<=1) ? 0 : max(sector[sect].ceilingz - sector[sect].floorz, dz);
dz = (k > 1) ? 0 : max(sector[sect].ceilingz - sector[sect].floorz, dz);
if (dz == 0)
break;