Fix incorrect ceiling height check for things with centered hitbox

This commit is contained in:
spherallic 2024-04-09 16:36:14 +02:00
parent 66965674a6
commit af8b070363

View file

@ -483,7 +483,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Check if above ceiling
if(!nointeraction)
{
double maxz = sd.Ceiling.plane.GetZ(Thing.Position) - info.Height;
double maxz = sd.Ceiling.plane.GetZ(Thing.Position) - (info.CenterHitbox ? info.Height / 2 : info.Height);
if(pos.z > maxz) pos.z = Math.Max(minz, maxz);
}
}