mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Generate Notifier: Clear events once after all 'on generated' functions
This commit is contained in:
parent
b952d42000
commit
07622bf9b4
3 changed files with 14 additions and 6 deletions
|
@ -1003,8 +1003,7 @@ bool GenerateNotifier::addEvent(GenNotifyType type, v3s16 pos, u32 id)
|
|||
|
||||
|
||||
void GenerateNotifier::getEvents(
|
||||
std::map<std::string, std::vector<v3s16> > &event_map,
|
||||
bool peek_events)
|
||||
std::map<std::string, std::vector<v3s16> > &event_map)
|
||||
{
|
||||
std::list<GenNotifyEvent>::iterator it;
|
||||
|
||||
|
@ -1016,9 +1015,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();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue