From f69fd1d528320199f04702563d26a4f6a592d4f0 Mon Sep 17 00:00:00 2001 From: expwnent Date: Sun, 20 Oct 2013 17:39:54 -0400 Subject: [PATCH] EventManager: prevent eventspam just after loading a save. --- library/modules/EventManager.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/library/modules/EventManager.cpp b/library/modules/EventManager.cpp index 3fd2ad48d..8215f9923 100644 --- a/library/modules/EventManager.cpp +++ b/library/modules/EventManager.cpp @@ -199,16 +199,17 @@ void DFHack::EventManager::onStateChange(color_ostream& out, state_change_event tickQueue.insert(newTickQueue.begin(), newTickQueue.end()); - nextItem = 0; - nextBuilding = 0; + nextItem = *df::global::item_next_id; + nextBuilding = -1;//*df::global::building_next_id; lastTick = 0; nextInvasion = df::global::ui->invasions.next_id; - gameLoaded = true; for ( auto i = df::global::world->constructions.begin(); i != df::global::world->constructions.end(); i++ ) { df::construction* constr = *i; constructions[constr->pos] = *constr; } + + gameLoaded = true; } }