forked from teamnwah/openmw-tes3coop
Merge pull request #266 from TES3MP/0.6.0
Add hotfix commits for 0.6.0 up to 18 Aug 2017
This commit is contained in:
commit
cffd985038
15 changed files with 92 additions and 33 deletions
|
@ -1,6 +1,8 @@
|
||||||
#include "Books.hpp"
|
#include "Books.hpp"
|
||||||
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
|
||||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||||
|
|
||||||
|
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||||
#include <apps/openmw-mp/Networking.hpp>
|
#include <apps/openmw-mp/Networking.hpp>
|
||||||
|
|
||||||
using namespace mwmp;
|
using namespace mwmp;
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
#include "Cells.hpp"
|
#include "Cells.hpp"
|
||||||
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
|
||||||
|
#include <components/openmw-mp/Log.hpp>
|
||||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||||
|
|
||||||
|
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||||
#include <apps/openmw-mp/Player.hpp>
|
#include <apps/openmw-mp/Player.hpp>
|
||||||
#include <apps/openmw-mp/Networking.hpp>
|
#include <apps/openmw-mp/Networking.hpp>
|
||||||
#include <components/openmw-mp/Log.hpp>
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
|
@ -3,9 +3,11 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "CharClass.hpp"
|
#include "CharClass.hpp"
|
||||||
|
|
||||||
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||||
|
|
||||||
#include <apps/openmw-mp/Networking.hpp>
|
#include <apps/openmw-mp/Networking.hpp>
|
||||||
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace ESM;
|
using namespace ESM;
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#include "Dialogue.hpp"
|
#include "Dialogue.hpp"
|
||||||
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
|
||||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||||
|
|
||||||
|
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||||
#include <apps/openmw-mp/Networking.hpp>
|
#include <apps/openmw-mp/Networking.hpp>
|
||||||
|
|
||||||
using namespace mwmp;
|
using namespace mwmp;
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
#include "Factions.hpp"
|
#include "Factions.hpp"
|
||||||
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
|
||||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
||||||
#include <apps/openmw-mp/Networking.hpp>
|
|
||||||
#include <components/misc/stringops.hpp>
|
#include <components/misc/stringops.hpp>
|
||||||
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||||
|
|
||||||
|
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||||
|
#include <apps/openmw-mp/Networking.hpp>
|
||||||
|
|
||||||
using namespace mwmp;
|
using namespace mwmp;
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,11 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
|
|
||||||
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||||
|
|
||||||
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||||
#include <apps/openmw-mp/Networking.hpp>
|
#include <apps/openmw-mp/Networking.hpp>
|
||||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
||||||
|
|
||||||
void GUIFunctions::_MessageBox(unsigned short pid, int id, const char *label) noexcept
|
void GUIFunctions::_MessageBox(unsigned short pid, int id, const char *label) noexcept
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,11 +3,13 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "Items.hpp"
|
#include "Items.hpp"
|
||||||
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
|
||||||
|
#include <components/misc/stringops.hpp>
|
||||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||||
|
|
||||||
|
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||||
#include <apps/openmw-mp/Networking.hpp>
|
#include <apps/openmw-mp/Networking.hpp>
|
||||||
#include <apps/openmw/mwworld/inventorystore.hpp>
|
#include <apps/openmw/mwworld/inventorystore.hpp>
|
||||||
#include <components/misc/stringops.hpp>
|
|
||||||
|
|
||||||
using namespace mwmp;
|
using namespace mwmp;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
#include "Mechanics.hpp"
|
#include "Mechanics.hpp"
|
||||||
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
|
||||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||||
#include <apps/openmw-mp/Networking.hpp>
|
|
||||||
#include <components/openmw-mp/Log.hpp>
|
#include <components/openmw-mp/Log.hpp>
|
||||||
|
|
||||||
|
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||||
|
#include <apps/openmw-mp/Networking.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,33 @@
|
||||||
#include "Miscellaneous.hpp"
|
#include "Miscellaneous.hpp"
|
||||||
|
|
||||||
|
#include <components/misc/stringops.hpp>
|
||||||
|
#include <components/openmw-mp/Log.hpp>
|
||||||
|
|
||||||
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||||
#include <apps/openmw-mp/Networking.hpp>
|
#include <apps/openmw-mp/Networking.hpp>
|
||||||
#include <components/openmw-mp/Log.hpp>
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
static std::string tempFilename;
|
||||||
|
|
||||||
|
const char *MiscellaneousFunctions::GetCaseInsensitiveFilename(const char *folderPath, const char *filename) noexcept
|
||||||
|
{
|
||||||
|
if (!boost::filesystem::exists(folderPath)) return "invalid";
|
||||||
|
|
||||||
|
boost::filesystem::directory_iterator end_itr; // default construction yields past-the-end
|
||||||
|
|
||||||
|
for (boost::filesystem::directory_iterator itr(folderPath); itr != end_itr; ++itr)
|
||||||
|
{
|
||||||
|
if (Misc::StringUtils::ciEqual(itr->path().filename().string(), filename))
|
||||||
|
{
|
||||||
|
tempFilename = itr->path().filename().string();
|
||||||
|
return tempFilename.c_str();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "invalid";
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int MiscellaneousFunctions::GetLastPlayerId() noexcept
|
unsigned int MiscellaneousFunctions::GetLastPlayerId() noexcept
|
||||||
{
|
{
|
||||||
return Players::getLastPlayerId();
|
return Players::getLastPlayerId();
|
||||||
|
|
|
@ -4,17 +4,30 @@
|
||||||
#include "../Types.hpp"
|
#include "../Types.hpp"
|
||||||
|
|
||||||
#define MISCELLANEOUSAPI \
|
#define MISCELLANEOUSAPI \
|
||||||
{"GetLastPlayerId", MiscellaneousFunctions::GetLastPlayerId},\
|
{"GetCaseInsensitiveFilename", MiscellaneousFunctions::GetCaseInsensitiveFilename},\
|
||||||
\
|
\
|
||||||
{"GetCurrentMpNum", MiscellaneousFunctions::GetCurrentMpNum},\
|
{"GetLastPlayerId", MiscellaneousFunctions::GetLastPlayerId},\
|
||||||
{"SetCurrentMpNum", MiscellaneousFunctions::SetCurrentMpNum},\
|
|
||||||
\
|
\
|
||||||
{"LogMessage", MiscellaneousFunctions::LogMessage},\
|
{"GetCurrentMpNum", MiscellaneousFunctions::GetCurrentMpNum},\
|
||||||
{"LogAppend", MiscellaneousFunctions::LogAppend}
|
{"SetCurrentMpNum", MiscellaneousFunctions::SetCurrentMpNum},\
|
||||||
|
\
|
||||||
|
{"LogMessage", MiscellaneousFunctions::LogMessage},\
|
||||||
|
{"LogAppend", MiscellaneousFunctions::LogAppend}
|
||||||
|
|
||||||
class MiscellaneousFunctions
|
class MiscellaneousFunctions
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the first filename in a folder that has a case insensitive match with the filename
|
||||||
|
* argument.
|
||||||
|
*
|
||||||
|
* This is used to retain case insensitivity when opening data files on Linux.
|
||||||
|
*
|
||||||
|
* \return The filename that matches.
|
||||||
|
*/
|
||||||
|
static const char *GetCaseInsensitiveFilename(const char *folderPath, const char *filename) noexcept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Get the last player ID currently connected to the server.
|
* \brief Get the last player ID currently connected to the server.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
#include "Quests.hpp"
|
#include "Quests.hpp"
|
||||||
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
|
||||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
||||||
#include <apps/openmw-mp/Networking.hpp>
|
|
||||||
#include <components/misc/stringops.hpp>
|
#include <components/misc/stringops.hpp>
|
||||||
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||||
|
|
||||||
|
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||||
|
#include <apps/openmw-mp/Networking.hpp>
|
||||||
|
|
||||||
using namespace mwmp;
|
using namespace mwmp;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
#include "Settings.hpp"
|
#include "Settings.hpp"
|
||||||
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
|
||||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||||
#include <apps/openmw-mp/Networking.hpp>
|
|
||||||
#include <components/openmw-mp/Log.hpp>
|
#include <components/openmw-mp/Log.hpp>
|
||||||
|
|
||||||
|
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||||
|
#include <apps/openmw-mp/Networking.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
#include "Spells.hpp"
|
#include "Spells.hpp"
|
||||||
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
|
||||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
||||||
#include <apps/openmw-mp/Networking.hpp>
|
|
||||||
#include <components/misc/stringops.hpp>
|
#include <components/misc/stringops.hpp>
|
||||||
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||||
|
|
||||||
|
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||||
|
#include <apps/openmw-mp/Networking.hpp>
|
||||||
|
|
||||||
using namespace mwmp;
|
using namespace mwmp;
|
||||||
|
|
||||||
|
|
|
@ -3,14 +3,16 @@
|
||||||
//
|
//
|
||||||
#include "Stats.hpp"
|
#include "Stats.hpp"
|
||||||
|
|
||||||
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
#include <iostream>
|
||||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
||||||
#include <apps/openmw-mp/Networking.hpp>
|
|
||||||
#include <components/esm/attr.hpp>
|
#include <components/esm/attr.hpp>
|
||||||
#include <components/esm/loadskil.hpp>
|
#include <components/esm/loadskil.hpp>
|
||||||
#include <components/misc/stringops.hpp>
|
#include <components/misc/stringops.hpp>
|
||||||
#include <components/openmw-mp/Log.hpp>
|
#include <components/openmw-mp/Log.hpp>
|
||||||
#include <iostream>
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||||
|
|
||||||
|
#include <apps/openmw-mp/Networking.hpp>
|
||||||
|
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace ESM;
|
using namespace ESM;
|
||||||
|
|
|
@ -592,7 +592,7 @@ namespace MWScript
|
||||||
*/
|
*/
|
||||||
if (mwmp::Main::get().getLocalPlayer()->hasFinishedCharGen())
|
if (mwmp::Main::get().getLocalPlayer()->hasFinishedCharGen())
|
||||||
{
|
{
|
||||||
if (!ref.getRefData().isEnabled())
|
if (!ref.getRefData().isEnabled() && ref.getCell() != nullptr)
|
||||||
{
|
{
|
||||||
mwmp::WorldEvent *worldEvent = mwmp::Main::get().getNetworking()->getWorldEvent();
|
mwmp::WorldEvent *worldEvent = mwmp::Main::get().getNetworking()->getWorldEvent();
|
||||||
worldEvent->reset();
|
worldEvent->reset();
|
||||||
|
@ -620,7 +620,7 @@ namespace MWScript
|
||||||
*/
|
*/
|
||||||
if (mwmp::Main::get().getLocalPlayer()->hasFinishedCharGen())
|
if (mwmp::Main::get().getLocalPlayer()->hasFinishedCharGen())
|
||||||
{
|
{
|
||||||
if (ref.getRefData().isEnabled())
|
if (ref.getRefData().isEnabled() && ref.getCell() != nullptr)
|
||||||
{
|
{
|
||||||
mwmp::WorldEvent *worldEvent = mwmp::Main::get().getNetworking()->getWorldEvent();
|
mwmp::WorldEvent *worldEvent = mwmp::Main::get().getNetworking()->getWorldEvent();
|
||||||
worldEvent->reset();
|
worldEvent->reset();
|
||||||
|
|
Loading…
Reference in a new issue