Run a registered event as it's registered and then at the specified interval.
This commit is contained in:
parent
f17a6479f7
commit
b62fbaf9ce
1 changed files with 2 additions and 2 deletions
|
@ -36,6 +36,8 @@ FGEventMgr::FGEvent::FGEvent( const char* name,
|
||||||
max_time(0),
|
max_time(0),
|
||||||
count(0)
|
count(0)
|
||||||
{
|
{
|
||||||
|
if (status == FG_EVENT_READY)
|
||||||
|
this->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -131,8 +133,6 @@ FGEventMgr::update( int dt )
|
||||||
void
|
void
|
||||||
FGEventMgr::Register( const FGEvent& event )
|
FGEventMgr::Register( const FGEvent& event )
|
||||||
{
|
{
|
||||||
// if (event.is_ready())
|
|
||||||
// event.run();
|
|
||||||
event_table.push_back( event );
|
event_table.push_back( event );
|
||||||
|
|
||||||
SG_LOG( SG_EVENT, SG_INFO, "Registered event " << event.name()
|
SG_LOG( SG_EVENT, SG_INFO, "Registered event " << event.name()
|
||||||
|
|
Loading…
Add table
Reference in a new issue