[Server] Add OnServerPostInit callback

This commit is contained in:
Koncord 2017-05-07 01:42:01 +08:00
parent 9992058942
commit 32284787de
2 changed files with 3 additions and 0 deletions

View file

@ -109,6 +109,7 @@ public:
static constexpr ScriptCallbackData callbacks[]{
{"Main", Function<int, int, int>()},
{"OnServerInit", Function<void>()},
{"OnServerPostInit", Function<void>()},
{"OnServerExit", Function<void, bool>()},
{"OnPlayerConnect", Function<bool, unsigned short>()},
{"OnPlayerDisconnect", Function<void, unsigned short>()},

View file

@ -251,6 +251,8 @@ int main(int argc, char *argv[])
networking.getMasterClient()->Start();
}
Script::Call<Script::CallbackIdentity("OnServerPostInit")>();
int code = networking.mainLoop();
RakNet::RakPeerInterface::DestroyInstance(peer);