forked from teamnwah/openmw-tes3coop
[Server] Add OnServerScriptCrash script event
This commit is contained in:
parent
a508a0faf8
commit
552a94a0ca
3 changed files with 3 additions and 0 deletions
|
@ -105,6 +105,7 @@ public:
|
|||
catch (std::exception &e)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, e.what());
|
||||
Script::Call<Script::CallbackIdentity("OnServerScriptCrash")>();
|
||||
|
||||
if (!mwmp::Networking::getPtr()->getScriptErrorIgnoringState())
|
||||
throw;
|
||||
|
|
|
@ -156,6 +156,7 @@ public:
|
|||
{"OnServerInit", Callback<>()},
|
||||
{"OnServerPostInit", Callback<>()},
|
||||
{"OnServerExit", Callback<bool>()},
|
||||
{"OnServerScriptCrash", Callback<>()},
|
||||
{"OnPlayerConnect", Callback<unsigned short>()},
|
||||
{"OnPlayerDisconnect", Callback<unsigned short>()},
|
||||
{"OnPlayerDeath", Callback<unsigned short>()},
|
||||
|
|
|
@ -307,6 +307,7 @@ int main(int argc, char *argv[])
|
|||
catch (std::exception &e)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, e.what());
|
||||
Script::Call<Script::CallbackIdentity("OnServerScriptCrash")>();
|
||||
throw; //fall through
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue