Skip to content

Commit

Permalink
Fixup a1810bd (better comment)
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Vultraz committed Apr 11, 2018
1 parent 1068ca1 commit 4b6e547
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/game_events/manager.cpp
Expand Up @@ -139,12 +139,12 @@ void manager::write_events(config& cfg) const
continue;
}

// This function may be invoked mid-event, such as via [inspect] (the inspector writes
// the events to a local config) or if an out-of-sync error happens in MP. In that case,
// it's possible for the currently running event is already disabled. That would happen
// if it's a first-time-only event; those are disabled before their actions are run. In
// that case, skip disabled events. If invoked from outside an event, however, there
// should be no disabled events in the list, so assert if one is found.
// Silently skip disabled events if this function is invoked mid-event, such as via
// [inspect] (the inspector writes the events to a local config) or if an out-of-sync
// error occurs in MP. If the event in question is first-time-only, it will already
// have been flagged as disabled by this point (such events are disabled before their
// actions are run). If a disabled event is encountered outside an event context,
// however, assert. That means something when wrong with event list cleanup.
if(eh->disabled() && is_event_running()) {
continue;
} else {
Expand Down

0 comments on commit 4b6e547

Please sign in to comment.