diff --git a/Source/multi.cpp b/Source/multi.cpp index 9d8498b26..5e7ee0d07 100644 --- a/Source/multi.cpp +++ b/Source/multi.cpp @@ -485,6 +485,7 @@ void InitGameInfo() sgGameInitInfo.bTheoQuest = *sgOptions.Gameplay.theoQuest ? 1 : 0; sgGameInitInfo.bCowQuest = *sgOptions.Gameplay.cowQuest ? 1 : 0; sgGameInitInfo.bFriendlyFire = *sgOptions.Gameplay.friendlyFire ? 1 : 0; + sgGameInitInfo.fullQuests = (!gbIsMultiplayer || *sgOptions.Gameplay.multiplayerFullQuests) ? 1 : 0; } void NetSendLoPri(int playerId, const byte *data, size_t size) diff --git a/Source/multi.h b/Source/multi.h index e0579e3f9..012fb3744 100644 --- a/Source/multi.h +++ b/Source/multi.h @@ -31,6 +31,7 @@ struct GameData { uint8_t bTheoQuest; uint8_t bCowQuest; uint8_t bFriendlyFire; + uint8_t fullQuests; }; /* @brief Contains info of running public game (for game list browsing) */ @@ -44,7 +45,7 @@ extern bool gbSomebodyWonGameKludge; extern uint16_t sgwPackPlrOffsetTbl[MAX_PLRS]; extern uint8_t gbActivePlayers; extern bool gbGameDestroyed; -extern GameData sgGameInitInfo; +extern DVL_API_FOR_TEST GameData sgGameInitInfo; extern bool gbSelectProvider; extern DVL_API_FOR_TEST bool gbIsMultiplayer; extern std::string GameName; diff --git a/Source/options.cpp b/Source/options.cpp index fe9090364..02c34e617 100644 --- a/Source/options.cpp +++ b/Source/options.cpp @@ -1062,6 +1062,7 @@ GameplayOptions::GameplayOptions() , theoQuest("Theo Quest", OptionEntryFlags::CantChangeInGame | OptionEntryFlags::OnlyHellfire, N_("Theo Quest"), N_("Enable Little Girl quest."), false) , cowQuest("Cow Quest", OptionEntryFlags::CantChangeInGame | OptionEntryFlags::OnlyHellfire, N_("Cow Quest"), N_("Enable Jersey's quest. Lester the farmer is replaced by the Complete Nut."), false) , friendlyFire("Friendly Fire", OptionEntryFlags::CantChangeInMultiPlayer, N_("Friendly Fire"), N_("Allow arrow/spell damage between players in multiplayer even when the friendly mode is on."), true) + , multiplayerFullQuests("MultiplayerFullQuests", OptionEntryFlags::CantChangeInMultiPlayer, N_("Full quests in Multiplayer"), N_("Enables the full/uncut singleplayer version of quests."), false) , testBard("Test Bard", OptionEntryFlags::CantChangeInGame, N_("Test Bard"), N_("Force the Bard character type to appear in the hero selection menu."), false) , testBarbarian("Test Barbarian", OptionEntryFlags::CantChangeInGame, N_("Test Barbarian"), N_("Force the Barbarian character type to appear in the hero selection menu."), false) , experienceBar("Experience Bar", OptionEntryFlags::None, N_("Experience Bar"), N_("Experience Bar is added to the UI at the bottom of the screen."), false) @@ -1110,6 +1111,7 @@ std::vector GameplayOptions::GetEntries() &theoQuest, &cowQuest, &friendlyFire, + &multiplayerFullQuests, &testBard, &testBarbarian, &experienceBar, diff --git a/Source/options.h b/Source/options.h index f5680e0cb..9dcb854c7 100644 --- a/Source/options.h +++ b/Source/options.h @@ -540,6 +540,8 @@ struct GameplayOptions : OptionCategoryBase { OptionEntryBoolean cowQuest; /** @brief Will players still damage other players in non-PvP mode. */ OptionEntryBoolean friendlyFire; + /** @brief Enables the full/uncut singleplayer version of quests. */ + OptionEntryBoolean multiplayerFullQuests; /** @brief Enable the bard hero class. */ OptionEntryBoolean testBard; /** @brief Enable the babarian hero class. */ diff --git a/Source/quests.cpp b/Source/quests.cpp index ad193015b..c29b84542 100644 --- a/Source/quests.cpp +++ b/Source/quests.cpp @@ -945,7 +945,7 @@ void SetMultiQuest(int q, quest_state s, bool log, int v1, int v2, int16_t qmsg) bool UseMultiplayerQuests() { - return gbIsMultiplayer; + return sgGameInitInfo.fullQuests == 0; } bool Quest::IsAvailable() diff --git a/test/drlg_test.hpp b/test/drlg_test.hpp index 98856ee1c..1612c8667 100644 --- a/test/drlg_test.hpp +++ b/test/drlg_test.hpp @@ -57,6 +57,7 @@ void TestInitGame(bool fullQuests = true, bool originalCathedral = true) MyPlayer = &Players[0]; MyPlayer->pOriginalCathedral = originalCathedral; + sgGameInitInfo.fullQuests = fullQuests ? 1 : 0; gbIsMultiplayer = !fullQuests; InitQuests();