mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-10-31 20:26:48 +00:00 
			
		
		
		
	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 <apps/openmw-mp/Script/ScriptFunctions.hpp> | ||||
| 
 | ||||
| #include <components/openmw-mp/NetworkMessages.hpp> | ||||
| 
 | ||||
| #include <apps/openmw-mp/Script/ScriptFunctions.hpp> | ||||
| #include <apps/openmw-mp/Networking.hpp> | ||||
| 
 | ||||
| using namespace mwmp; | ||||
|  |  | |||
|  | @ -1,9 +1,11 @@ | |||
| #include "Cells.hpp" | ||||
| #include <apps/openmw-mp/Script/ScriptFunctions.hpp> | ||||
| 
 | ||||
| #include <components/openmw-mp/Log.hpp> | ||||
| #include <components/openmw-mp/NetworkMessages.hpp> | ||||
| 
 | ||||
| #include <apps/openmw-mp/Script/ScriptFunctions.hpp> | ||||
| #include <apps/openmw-mp/Player.hpp> | ||||
| #include <apps/openmw-mp/Networking.hpp> | ||||
| #include <components/openmw-mp/Log.hpp> | ||||
| 
 | ||||
| #include <iostream> | ||||
| using namespace std; | ||||
|  |  | |||
|  | @ -3,9 +3,11 @@ | |||
| //
 | ||||
| 
 | ||||
| #include "CharClass.hpp" | ||||
| 
 | ||||
| #include <components/openmw-mp/NetworkMessages.hpp> | ||||
| 
 | ||||
| #include <apps/openmw-mp/Networking.hpp> | ||||
| #include <apps/openmw-mp/Script/ScriptFunctions.hpp> | ||||
| #include <components/openmw-mp/NetworkMessages.hpp> | ||||
| 
 | ||||
| using namespace std; | ||||
| using namespace ESM; | ||||
|  |  | |||
|  | @ -1,6 +1,8 @@ | |||
| #include "Dialogue.hpp" | ||||
| #include <apps/openmw-mp/Script/ScriptFunctions.hpp> | ||||
| 
 | ||||
| #include <components/openmw-mp/NetworkMessages.hpp> | ||||
| 
 | ||||
| #include <apps/openmw-mp/Script/ScriptFunctions.hpp> | ||||
| #include <apps/openmw-mp/Networking.hpp> | ||||
| 
 | ||||
| using namespace mwmp; | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| #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/openmw-mp/NetworkMessages.hpp> | ||||
| 
 | ||||
| #include <apps/openmw-mp/Script/ScriptFunctions.hpp> | ||||
| #include <apps/openmw-mp/Networking.hpp> | ||||
| 
 | ||||
| using namespace mwmp; | ||||
| 
 | ||||
|  |  | |||
|  | @ -3,9 +3,11 @@ | |||
| //
 | ||||
| 
 | ||||
| #include "GUI.hpp" | ||||
| 
 | ||||
| #include <components/openmw-mp/NetworkMessages.hpp> | ||||
| 
 | ||||
| #include <apps/openmw-mp/Script/ScriptFunctions.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 | ||||
| { | ||||
|  |  | |||
|  | @ -3,11 +3,13 @@ | |||
| //
 | ||||
| 
 | ||||
| #include "Items.hpp" | ||||
| #include <apps/openmw-mp/Script/ScriptFunctions.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> | ||||
| #include <apps/openmw/mwworld/inventorystore.hpp> | ||||
| #include <components/misc/stringops.hpp> | ||||
| 
 | ||||
| using namespace mwmp; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,9 +1,11 @@ | |||
| #include "Mechanics.hpp" | ||||
| #include <apps/openmw-mp/Script/ScriptFunctions.hpp> | ||||
| 
 | ||||
| #include <components/openmw-mp/NetworkMessages.hpp> | ||||
| #include <apps/openmw-mp/Networking.hpp> | ||||
| #include <components/openmw-mp/Log.hpp> | ||||
| 
 | ||||
| #include <apps/openmw-mp/Script/ScriptFunctions.hpp> | ||||
| #include <apps/openmw-mp/Networking.hpp> | ||||
| 
 | ||||
| #include <iostream> | ||||
| using namespace std; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,11 +1,33 @@ | |||
| #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/Networking.hpp> | ||||
| #include <components/openmw-mp/Log.hpp> | ||||
| 
 | ||||
| #include <iostream> | ||||
| 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 | ||||
| { | ||||
|     return Players::getLastPlayerId(); | ||||
|  |  | |||
|  | @ -4,17 +4,30 @@ | |||
| #include "../Types.hpp" | ||||
| 
 | ||||
| #define MISCELLANEOUSAPI \ | ||||
|     {"GetLastPlayerId",  MiscellaneousFunctions::GetLastPlayerId},\ | ||||
|     {"GetCaseInsensitiveFilename",  MiscellaneousFunctions::GetCaseInsensitiveFilename},\ | ||||
|     \ | ||||
|     {"GetCurrentMpNum",  MiscellaneousFunctions::GetCurrentMpNum},\ | ||||
|     {"SetCurrentMpNum",  MiscellaneousFunctions::SetCurrentMpNum},\ | ||||
|     {"GetLastPlayerId",             MiscellaneousFunctions::GetLastPlayerId},\ | ||||
|     \ | ||||
|     {"LogMessage",       MiscellaneousFunctions::LogMessage},\ | ||||
|     {"LogAppend",        MiscellaneousFunctions::LogAppend} | ||||
|     {"GetCurrentMpNum",             MiscellaneousFunctions::GetCurrentMpNum},\ | ||||
|     {"SetCurrentMpNum",             MiscellaneousFunctions::SetCurrentMpNum},\ | ||||
|     \ | ||||
|     {"LogMessage",                  MiscellaneousFunctions::LogMessage},\ | ||||
|     {"LogAppend",                   MiscellaneousFunctions::LogAppend} | ||||
| 
 | ||||
| class MiscellaneousFunctions | ||||
| { | ||||
| 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. | ||||
|     * | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| #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/openmw-mp/NetworkMessages.hpp> | ||||
| 
 | ||||
| #include <apps/openmw-mp/Script/ScriptFunctions.hpp> | ||||
| #include <apps/openmw-mp/Networking.hpp> | ||||
| 
 | ||||
| using namespace mwmp; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,9 +1,11 @@ | |||
| #include "Settings.hpp" | ||||
| #include <apps/openmw-mp/Script/ScriptFunctions.hpp> | ||||
| 
 | ||||
| #include <components/openmw-mp/NetworkMessages.hpp> | ||||
| #include <apps/openmw-mp/Networking.hpp> | ||||
| #include <components/openmw-mp/Log.hpp> | ||||
| 
 | ||||
| #include <apps/openmw-mp/Script/ScriptFunctions.hpp> | ||||
| #include <apps/openmw-mp/Networking.hpp> | ||||
| 
 | ||||
| #include <iostream> | ||||
| using namespace std; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| #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/openmw-mp/NetworkMessages.hpp> | ||||
| 
 | ||||
| #include <apps/openmw-mp/Script/ScriptFunctions.hpp> | ||||
| #include <apps/openmw-mp/Networking.hpp> | ||||
| 
 | ||||
| using namespace mwmp; | ||||
| 
 | ||||
|  |  | |||
|  | @ -3,14 +3,16 @@ | |||
| //
 | ||||
| #include "Stats.hpp" | ||||
| 
 | ||||
| #include <apps/openmw-mp/Script/ScriptFunctions.hpp> | ||||
| #include <components/openmw-mp/NetworkMessages.hpp> | ||||
| #include <apps/openmw-mp/Networking.hpp> | ||||
| #include <iostream> | ||||
| 
 | ||||
| #include <components/esm/attr.hpp> | ||||
| #include <components/esm/loadskil.hpp> | ||||
| #include <components/misc/stringops.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 ESM; | ||||
|  |  | |||
|  | @ -592,7 +592,7 @@ namespace MWScript | |||
|         */ | ||||
|         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(); | ||||
|                 worldEvent->reset(); | ||||
|  | @ -620,7 +620,7 @@ namespace MWScript | |||
|         */ | ||||
|         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(); | ||||
|                 worldEvent->reset(); | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue