mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-28 15:09:40 +00:00
[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)
|
catch (std::exception &e)
|
||||||
{
|
{
|
||||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, e.what());
|
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, e.what());
|
||||||
|
Script::Call<Script::CallbackIdentity("OnServerScriptCrash")>();
|
||||||
|
|
||||||
if (!mwmp::Networking::getPtr()->getScriptErrorIgnoringState())
|
if (!mwmp::Networking::getPtr()->getScriptErrorIgnoringState())
|
||||||
throw;
|
throw;
|
||||||
|
|
|
@ -156,6 +156,7 @@ public:
|
||||||
{"OnServerInit", Callback<>()},
|
{"OnServerInit", Callback<>()},
|
||||||
{"OnServerPostInit", Callback<>()},
|
{"OnServerPostInit", Callback<>()},
|
||||||
{"OnServerExit", Callback<bool>()},
|
{"OnServerExit", Callback<bool>()},
|
||||||
|
{"OnServerScriptCrash", Callback<>()},
|
||||||
{"OnPlayerConnect", Callback<unsigned short>()},
|
{"OnPlayerConnect", Callback<unsigned short>()},
|
||||||
{"OnPlayerDisconnect", Callback<unsigned short>()},
|
{"OnPlayerDisconnect", Callback<unsigned short>()},
|
||||||
{"OnPlayerDeath", Callback<unsigned short>()},
|
{"OnPlayerDeath", Callback<unsigned short>()},
|
||||||
|
|
|
@ -307,6 +307,7 @@ int main(int argc, char *argv[])
|
||||||
catch (std::exception &e)
|
catch (std::exception &e)
|
||||||
{
|
{
|
||||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, e.what());
|
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, e.what());
|
||||||
|
Script::Call<Script::CallbackIdentity("OnServerScriptCrash")>();
|
||||||
throw; //fall through
|
throw; //fall through
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue