Remove useless D1 test for TRIGGER_ONE_SHOT
This block previously was used to clear TRIGGER_ON, but that change was removed because TRIGGER_ON was a write-only flag. This block is now useless, so remove it. This should also fix an obscure crash reported by AlumiuN. AlumiuN proposed adding a test that seg->children[side] is still valid, but since the logic to execute would be useless even when the test succeeds, it is simpler to remove this code entirely. Reported-by: AlumiuN <https://github.com/dxx-rebirth/dxx-rebirth/issues/515> Suggested-by: AlumiuN <https://github.com/dxx-rebirth/dxx-rebirth/pull/518#issue-443277182>
This commit is contained in:
parent
738e4a740e
commit
a20551191a
|
@ -562,21 +562,6 @@ window_event_result check_trigger(const vcsegptridx_t seg, const unsigned side,
|
|||
return result;
|
||||
}
|
||||
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
auto &Triggers = LevelUniqueWallSubsystemState.Triggers;
|
||||
auto &vmtrgptr = Triggers.vmptr;
|
||||
auto &t = *vmtrgptr(trigger_num);
|
||||
if (t.flags & TRIGGER_ONE_SHOT)
|
||||
{
|
||||
const shared_segment &csegp = *vcsegptr(seg->children[side]);
|
||||
auto cside = find_connect_side(seg, csegp);
|
||||
Assert(cside != side_none);
|
||||
|
||||
const auto cwall_num = csegp.sides[cside].wall_num;
|
||||
if (cwall_num == wall_none)
|
||||
return window_event_result::ignored;
|
||||
}
|
||||
#endif
|
||||
if (Game_mode & GM_MULTI)
|
||||
multi_send_trigger(trigger_num);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue