diff --git a/src/Inferno/Game.Object.cpp b/src/Inferno/Game.Object.cpp index 4d00c09e..8f1399cc 100644 --- a/src/Inferno/Game.Object.cpp +++ b/src/Inferno/Game.Object.cpp @@ -186,12 +186,13 @@ namespace Inferno { auto id = TraceSegment(level, obj.Segment, obj.Position); - if ((id == SegID::None || id == SegID::Exit) && obj.Segment == Game::Terrain.ExitTag.Segment) { - id = SegID::Terrain; // Assume that the object has entered the terrain - } - else if (id == SegID::None) { - SetFlag(obj.Flags, ObjectFlag::OutOfBounds); - return false; + if (id == SegID::None || id == SegID::Exit) { + if (obj.Segment == Game::Terrain.ExitTag.Segment) + id = SegID::Terrain; // Assume that the object has entered the terrain + else { + SetFlag(obj.Flags, ObjectFlag::OutOfBounds); + return false; + } } auto ref = Game::GetObjectRef(obj);