forked from teamnwah/openmw-tes3coop
[Server] Fix typos and make all files end with newlines
This commit is contained in:
parent
b20df4b7cd
commit
bbac26294f
10 changed files with 14 additions and 13 deletions
|
@ -69,7 +69,7 @@ std::shared_ptr<Player> Players::addPlayer(RakNet::RakNetGUID guid)
|
||||||
|
|
||||||
void Players::deletePlayerByPID(int pid)
|
void Players::deletePlayerByPID(int pid)
|
||||||
{
|
{
|
||||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Marking player (pid %lu) to deleting", pid);
|
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Marking player (pid %i) for deletion", pid);
|
||||||
auto &ls = store.get<ByID>();
|
auto &ls = store.get<ByID>();
|
||||||
auto it = ls.find(pid);
|
auto it = ls.find(pid);
|
||||||
if (it != ls.end())
|
if (it != ls.end())
|
||||||
|
@ -80,7 +80,7 @@ void Players::deletePlayerByPID(int pid)
|
||||||
|
|
||||||
void Players::deletePlayerByGUID(RakNet::RakNetGUID guid)
|
void Players::deletePlayerByGUID(RakNet::RakNetGUID guid)
|
||||||
{
|
{
|
||||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Marking player (guid %lu) to deleting", guid.g);
|
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Marking player (guid %lu) for deletion", guid.g);
|
||||||
auto &ls = store.get<ByGUID>();
|
auto &ls = store.get<ByGUID>();
|
||||||
auto it = ls.find(guid.g);
|
auto it = ls.find(guid.g);
|
||||||
if (it != ls.end())
|
if (it != ls.end())
|
||||||
|
|
|
@ -78,7 +78,7 @@ LuaState::LuaState()
|
||||||
configEnv = sol::environment(*lua, sol::create, lua->globals());
|
configEnv = sol::environment(*lua, sol::create, lua->globals());
|
||||||
lua->set("Config", configEnv); // plain global environment for mod configuration
|
lua->set("Config", configEnv); // plain global environment for mod configuration
|
||||||
|
|
||||||
// errors in sol::functions catches only in debug build for better performance
|
// errors in sol::functions are caught only in Debug or RelWithDebInfo builds for better performance
|
||||||
#ifdef SOL_SAFE_FUNCTIONS
|
#ifdef SOL_SAFE_FUNCTIONS
|
||||||
lua->set_function("ErrorHandler", [](sol::object error_msg) {
|
lua->set_function("ErrorHandler", [](sol::object error_msg) {
|
||||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, ("Lua: " + error_msg.as<string>()).c_str());
|
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, ("Lua: " + error_msg.as<string>()).c_str());
|
||||||
|
@ -134,6 +134,7 @@ LuaState::LuaState()
|
||||||
lua->set_function("getCurrentMpNum", []() {
|
lua->set_function("getCurrentMpNum", []() {
|
||||||
return mwmp::Networking::getPtr()->getCurrentMpNum();
|
return mwmp::Networking::getPtr()->getCurrentMpNum();
|
||||||
});
|
});
|
||||||
|
|
||||||
lua->set_function("setCurrentMpNum", [](int num) {
|
lua->set_function("setCurrentMpNum", [](int num) {
|
||||||
mwmp::Networking::getPtr()->setCurrentMpNum(num);
|
mwmp::Networking::getPtr()->setCurrentMpNum(num);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue