mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-29 04:32:17 +00:00
First set of Core Classes changes! w00t :P
This was SVN commit r823.
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
#include "Scheduler.h"
|
||||
#include "Entity.h"
|
||||
|
||||
extern size_t simulationTime;
|
||||
extern size_t frameCount;
|
||||
size_t simulationTime;
|
||||
size_t frameCount;
|
||||
|
||||
void CScheduler::pushTime( size_t delay, const HEntity& destination, const CMessage* message )
|
||||
{
|
||||
@@ -45,8 +45,11 @@ void CScheduler::pushInterval( size_t first, size_t interval, JSFunction* functi
|
||||
timeFunction.push( SDispatchObjectFunction( function, simulationTime + first, operateOn, interval ) );
|
||||
}
|
||||
|
||||
void CScheduler::update()
|
||||
void CScheduler::update(size_t simElapsed)
|
||||
{
|
||||
simulationTime += simElapsed;
|
||||
frameCount++;
|
||||
|
||||
while( !timeMessage.empty() )
|
||||
{
|
||||
SDispatchObjectMessage top = timeMessage.top();
|
||||
@@ -105,4 +108,4 @@ void CScheduler::update()
|
||||
jsval rval;
|
||||
JS_CallFunction( g_ScriptingHost.getContext(), top.operateOn, top.function, 0, NULL, &rval );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user