Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/Inferno/Game.Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down