From a6b9acb7af7ac7b8dd184ee33ced425b616b9744 Mon Sep 17 00:00:00 2001 From: paramat Date: Fri, 2 Mar 2018 13:39:39 +0000 Subject: Generate Notifier: Clear events once after all 'on generated' functions --- src/mapgen.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/mapgen.cpp') diff --git a/src/mapgen.cpp b/src/mapgen.cpp index cb0100722..6fe2906bb 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -982,8 +982,7 @@ bool GenerateNotifier::addEvent(GenNotifyType type, v3s16 pos, u32 id) void GenerateNotifier::getEvents( - std::map > &event_map, - bool peek_events) + std::map > &event_map) { std::list::iterator it; @@ -995,9 +994,12 @@ void GenerateNotifier::getEvents( event_map[name].push_back(gn.pos); } +} + - if (!peek_events) - m_notify_events.clear(); +void GenerateNotifier::clearEvents() +{ + m_notify_events.clear(); } -- cgit v1.2.3