From 8f43b972841ecddebe6357fe815d4e8fcf15a6ed Mon Sep 17 00:00:00 2001 From: expwnent Date: Tue, 1 Jul 2014 09:02:20 -0400 Subject: [PATCH] EventManager tweaks. --- library/modules/EventManager.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/library/modules/EventManager.cpp b/library/modules/EventManager.cpp index d16b54e3b..828a46496 100644 --- a/library/modules/EventManager.cpp +++ b/library/modules/EventManager.cpp @@ -758,9 +758,6 @@ static void updateReportToRelevantUnits() { static void manageReportEvent(color_ostream& out) { multimap copy(handlers[EventType::REPORT].begin(), handlers[EventType::REPORT].end()); std::vector& reports = df::global::world->status.reports; - if (reports.size() == 0) { - return; - } size_t a = df::report::binsearch_index(reports, lastReport, false); //this may or may not be needed: I don't know if binsearch_index goes earlier or later if it can't hit the target exactly while (a < reports.size() && reports[a]->id <= lastReport) { @@ -789,9 +786,6 @@ static df::unit_wound* getWound(df::unit* attacker, df::unit* defender) { static void manageUnitAttackEvent(color_ostream& out) { multimap copy(handlers[EventType::UNIT_ATTACK].begin(), handlers[EventType::UNIT_ATTACK].end()); std::vector& reports = df::global::world->status.reports; - if (reports.size() == 0) { - return; - } size_t a = df::report::binsearch_index(reports, lastReportUnitAttack, false); //this may or may not be needed: I don't know if binsearch_index goes earlier or later if it can't hit the target exactly while (a < reports.size() && reports[a]->id <= lastReportUnitAttack) { @@ -903,4 +897,7 @@ static void manageUnitAttackEvent(color_ostream& out) { } } +static void manageInteractionEvent(color_ostream& out) { + +}