Visual Mode: Take CenterHitbox property into account for thing heights.

This commit is contained in:
sphere 2021-10-25 22:01:36 +02:00
parent 78fd53417a
commit 3e4c6fe777

View file

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