16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 15:59:18 +02:00

build 190701. basic radio call event launch support

This commit is contained in:
tmj-fstate
2019-07-02 01:37:05 +02:00
parent 0f0c30dbff
commit 06b7f009cc
14 changed files with 135 additions and 33 deletions

11
Event.h
View File

@@ -559,6 +559,9 @@ public:
// adds specified event launcher to the list of global launchers
void
queue( TEventLauncher *Launcher );
// inserts in the event query events assigned to event launchers capable of receiving specified radio message sent from specified location
void
queue_receivers( radio_message const Message, glm::dvec3 const &Location );
// legacy method, updates event queues
void
update();
@@ -569,7 +572,10 @@ public:
inline
bool
insert( TEventLauncher *Launcher ) {
return m_launchers.insert( Launcher ); }
return (
Launcher->IsRadioActivated() ?
m_radiodrivenlaunchers.insert( Launcher ) :
m_inputdrivenlaunchers.insert( Launcher ) ); }
// returns first event in the queue
inline
basic_event *
@@ -609,7 +615,8 @@ private:
basic_event *QueryRootEvent { nullptr };
basic_event *m_workevent { nullptr };
event_map m_eventmap;
basic_table<TEventLauncher> m_launchers;
basic_table<TEventLauncher> m_inputdrivenlaunchers;
basic_table<TEventLauncher> m_radiodrivenlaunchers;
eventlauncher_sequence m_launcherqueue;
};