mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-15 23:49:55 +00:00
19 lines
668 B
C++
19 lines
668 B
C++
#include <components/openmw-mp/Base/BaseStructs.hpp>
|
|
|
|
#include "../mwscript/interpretercontext.hpp"
|
|
|
|
#include "ScriptController.hpp"
|
|
|
|
unsigned short ScriptController::getPacketOriginFromContextType(unsigned short contextType)
|
|
{
|
|
if (contextType == Interpreter::Context::CONSOLE)
|
|
return mwmp::CLIENT_CONSOLE;
|
|
else if (contextType == Interpreter::Context::DIALOGUE)
|
|
return mwmp::CLIENT_DIALOGUE;
|
|
else if (contextType == Interpreter::Context::SCRIPT_LOCAL)
|
|
return mwmp::CLIENT_SCRIPT_LOCAL;
|
|
else if (contextType == Interpreter::Context::SCRIPT_GLOBAL)
|
|
return mwmp::CLIENT_SCRIPT_GLOBAL;
|
|
|
|
return mwmp::CLIENT_GAMEPLAY;
|
|
}
|