mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01:00
Move routine processing outside the core class.
This commit is contained in:
parent
86297882d5
commit
b9b688581b
@ -8,9 +8,6 @@
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
namespace SqMod {
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
extern void ProcessRoutines();
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void Core::EmitCustomEvent(Int32 group, Int32 header, Object & payload)
|
||||
{
|
||||
@ -186,9 +183,6 @@ void Core::EmitServerShutdown()
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void Core::EmitServerFrame(Float32 elapsed_time)
|
||||
{
|
||||
// Update routines
|
||||
ProcessRoutines();
|
||||
// Now forward the event
|
||||
Emit(mOnServerFrame, elapsed_time);
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@ static Object g_ReloadPayload;
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
extern void InitExports();
|
||||
extern void ProcessRoutines();
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* Perform a scripts reload at the end of the current event.
|
||||
@ -178,9 +179,12 @@ static void OnServerFrame(float elapsed_time)
|
||||
// Attempt to forward the event
|
||||
try
|
||||
{
|
||||
// Now forward the event
|
||||
Core::Get().EmitServerFrame(elapsed_time);
|
||||
}
|
||||
SQMOD_CATCH_EVENT_EXCEPTION(OnServerFrame)
|
||||
// Process routines, if any
|
||||
ProcessRoutines();
|
||||
// See if a reload was requested
|
||||
SQMOD_RELOAD_CHECK(false)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user