forked from teamnwah/openmw-tes3coop
Merge pull request #352 from TES3MP/master while resolving conflicts
# Conflicts: # README.md
This commit is contained in:
commit
7e322f1f8b
13 changed files with 220 additions and 44 deletions
|
@ -153,6 +153,7 @@ Programmers
|
|||
Sylvain Thesnieres (Garvek)
|
||||
t6
|
||||
terrorfisch
|
||||
thegriglat
|
||||
Thomas Luppi (Digmaster)
|
||||
Will Herrmann (Thunderforge)
|
||||
Tom Mason (wheybags)
|
||||
|
|
137
CHANGELOG.md
137
CHANGELOG.md
|
@ -1,3 +1,140 @@
|
|||
0.43.0
|
||||
------
|
||||
|
||||
Bug #815: Different settings cause inconsistent underwater visibility
|
||||
Bug #1452: autosave is not executed when waiting
|
||||
Bug #1555: Closing containers with spacebar doesn't work after touching an item
|
||||
Bug #1692: Can't close container when item is "held"
|
||||
Bug #2405: Maximum distance for guards attacking hostile creatures is incorrect
|
||||
Bug #2445: Spellcasting can be interrupted
|
||||
Bug #2489: Keeping map open not persisted between saves
|
||||
Bug #2594: 1st person view uses wrong body texture with Better bodies
|
||||
Bug #2628: enablestatreviewmenu command doen't read race, class and sign values from current game
|
||||
Bug #2639: Attacking flag isn't reset upon reloading
|
||||
Bug #2698: Snow and rain VFX move with the player
|
||||
Bug #2704: Some creature swim animations not being used
|
||||
Bug #2789: Potential risk of misunderstanding using the colored "owned" crosshair feature
|
||||
Bug #3045: Settings containing '#' cannot be loaded
|
||||
Bug #3097: Drop() doesn't work when an item is held (with the mouse)
|
||||
Bug #3110: GetDetected doesn't work without a reference
|
||||
Bug #3126: Framerate nosedives when adjusting dialogue window size
|
||||
Bug #3243: Ampersand in configuration files isn't escaped automatically
|
||||
Bug #3365: Wrong water reflection along banks
|
||||
Bug #3441: Golden saint always dispelling soul trap / spell priority issue
|
||||
Bug #3528: Disposing of corpses breaks quests
|
||||
Bug #3531: No FPS limit when playing bink videos even though "framerate limit" is set in settings.cfg
|
||||
Bug #3647: Multi-effect spells play audio louder than in Vanilla
|
||||
Bug #3656: NPCs forget where their place in the world is
|
||||
Bug #3665: Music transitions are too abrupt
|
||||
Bug #3679: Spell cast effect should disappear after using rest command
|
||||
Bug #3684: Merchants do not restock empty soul gems if they acquire filled ones.
|
||||
Bug #3694: Wrong magicka bonus applied on character creation
|
||||
Bug #3706: Guards don't try to arrest the player if attacked
|
||||
Bug #3709: Editor: Camera is not positioned correctly on mode switches related to orbital mode
|
||||
Bug #3720: Death counter not cleaned of non-existing IDs when loading a game
|
||||
Bug #3744: "Greater/lesser or equal" operators are not parsed when their signs are swapped
|
||||
Bug #3749: Yagrum Bagarn moves to different position on encountering
|
||||
Bug #3766: DisableLevitation does not remove visuals of preexisting effect
|
||||
Bug #3787: Script commands in result box for voiced dialogue are ignored
|
||||
Bug #3793: OpenMW tries to animate animated references even when they are disabled
|
||||
Bug #3794: Default sound buffer size is too small for mods
|
||||
Bug #3796: Mod 'Undress for me' doesn't work: NPCs re-equip everything
|
||||
Bug #3798: tgm command behaviour differs from vanilla
|
||||
Bug #3804: [Mod] Animated Morrowind: some animations do not loop correctly
|
||||
Bug #3805: Slight enchant miscalculation
|
||||
Bug #3826: Rendering problems with an image in a letter
|
||||
Bug #3833: [Mod] Windows Glow: windows textures are much darker than in original game
|
||||
Bug #3835: Bodyparts with multiple NiTriShapes are not handled correctly
|
||||
Bug #3839: InventoryStore::purgeEffect() removes only first effect with argument ID
|
||||
Bug #3843: Wrong jumping fatigue loss calculations
|
||||
Bug #3850: Boethiah's voice is distorted underwater
|
||||
Bug #3851: NPCs and player say things while underwater
|
||||
Bug #3864: Crash when exiting to Khartag point from Ilunibi
|
||||
Bug #3878: Swapping soul gems while enchanting allows constant effect enchantments using any soul gem
|
||||
Bug #3879: Dialogue option: Go to jail, persists beyond quickload
|
||||
Bug #3891: Journal displays empty entries
|
||||
Bug #3892: Empty space before dialogue entry display
|
||||
Bug #3898: (mod) PositionCell in dialogue results closes dialogue window
|
||||
Bug #3906: "Could not find Data Files location" dialog can appear multiple times
|
||||
Bug #3908: [Wizard] User gets stuck if they cancel out of installing from a CD
|
||||
Bug #3909: Morrowind Content Language dropdown is the only element on the right half of the Settings window
|
||||
Bug #3910: Launcher window can be resized so that it cuts off the scroll
|
||||
Bug #3915: NC text key on nifs doesn't work
|
||||
Bug #3919: Closing inventory while cursor hovers over spell (or other magic menu item) produces left click sound
|
||||
Bug #3922: Combat AI should avoid enemy hits when casts Self-ranged spells
|
||||
Bug #3934: [macOS] Copy/Paste from system clipboard uses Control key instead of Command key
|
||||
Bug #3935: Incorrect attack strength for AI actors
|
||||
Bug #3937: Combat AI: enchanted weapons have too high rating
|
||||
Bug #3942: UI sounds are distorted underwater
|
||||
Bug #3943: CPU/GPU usage should stop when the game is minimised
|
||||
Bug #3944: Attempting to sell stolen items back to their owner does not remove them from your inventory
|
||||
Bug #3955: Player's avatar rendering issues
|
||||
Bug #3956: EditEffectDialog: Cancel button does not update a Range button and an Area slider properly
|
||||
Bug #3957: Weird bodypart rendering if a node has reserved name
|
||||
Bug #3960: Clothes with high cost (> 32768) are not handled properly
|
||||
Bug #3963: When on edge of being burdened the condition doesn't lower as you run.
|
||||
Bug #3971: Editor: Incorrect colour field in cell table
|
||||
Bug #3974: Journal page turning doesn't produce sounds
|
||||
Bug #3978: Instant opening and closing happens when using a Controller with Menus/Containers
|
||||
Bug #3981: Lagging when spells are cast, especially noticeable on new landmasses such as Tamriel Rebuilt
|
||||
Bug #3982: Down sounds instead of Up ones are played when trading
|
||||
Bug #3987: NPCs attack after some taunting with no "Goodbye"
|
||||
Bug #3991: Journal can still be opened at main menu
|
||||
Bug #3995: Dispel cancels every temporary magic effect
|
||||
Bug #4002: Build broken on OpenBSD with clang
|
||||
Bug #4003: Reduce Render Area of Inventory Doll to Fit Within Border
|
||||
Bug #4004: Manis Virmaulese attacks without saying anything
|
||||
Bug #4010: AiWander: "return to the spawn position" feature does not work properly
|
||||
Bug #4016: Closing menus with spacebar will still send certain assigned actions through afterwards
|
||||
Bug #4017: GetPCRunning and GetPCSneaking should check that the PC is actually moving
|
||||
Bug #4024: Poor music track distribution
|
||||
Bug #4025: Custom spell with copy-pasted name always sorts to top of spell list
|
||||
Bug #4027: Editor: OpenMW-CS misreports its own name as "OpenCS", under Mac OS
|
||||
Bug #4033: Archers don't attack if the arrows have run out and there is no other weapon
|
||||
Bug #4037: Editor: New greetings do not work in-game.
|
||||
Bug #4049: Reloading a saved game while falling prevents damage
|
||||
Bug #4056: Draw animation should not be played when player equips a new weapon
|
||||
Bug #4074: Editor: Merging of LAND/LTEX records
|
||||
Bug #4076: Disposition bar is not updated when "goodbye" selected in dialogue
|
||||
Bug #4079: Alchemy skill increases do not take effect until next batch
|
||||
Bug #4093: GetResistFire, getResistFrost and getResistShock doesn't work as in vanilla
|
||||
Bug #4094: Level-up messages for levels past 20 are hardcoded not to be used
|
||||
Bug #4095: Error in framelistener when take all items from a dead corpse
|
||||
Bug #4096: Messagebox with the "%0.f" format should use 0 digit precision
|
||||
Bug #4104: Cycling through weapons does not skip broken ones
|
||||
Bug #4105: birthsign generation menu does not show full details
|
||||
Bug #4107: Editor: Left pane in Preferences window is too narrow
|
||||
Bug #4112: Inventory sort order is inconsistent
|
||||
Bug #4113: 'Resolution not supported in fullscreen' message is inconvenient
|
||||
Bug #4131: Pickpocketing behaviour is different from vanilla
|
||||
Bug #4155: NPCs don't equip a second ring in some cases
|
||||
Bug #4156: Snow doesn't create water ripples
|
||||
Bug #4165: NPCs autoequip new clothing with the same price
|
||||
Feature #452: Rain-induced water ripples
|
||||
Feature #824: Fading for doors and teleport commands
|
||||
Feature #933: Editor: LTEX record table
|
||||
Feature #936: Editor: LAND record table
|
||||
Feature #1374: AI: Resurface to breathe
|
||||
Feature #2320: ess-Importer: convert projectiles
|
||||
Feature #2509: Editor: highlighting occurrences of a word in a script
|
||||
Feature #2748: Editor: Should use one resource manager per document
|
||||
Feature #2834: Have openMW's UI remember what menu items were 'pinned' across boots.
|
||||
Feature #2923: Option to show the damage of the arrows through tooltip.
|
||||
Feature #3099: Disabling inventory while dragging an item forces you to drop it
|
||||
Feature #3274: Editor: Script Editor - Shortcuts and context menu options for commenting code out and uncommenting code respectively
|
||||
Feature #3275: Editor: User Settings- Add an option to reset settings to their default status (per category / all)
|
||||
Feature #3400: Add keyboard shortcuts for menus
|
||||
Feature #3492: Show success rate while enchanting
|
||||
Feature #3530: Editor: Reload data files
|
||||
Feature #3682: Editor: Default key binding reset
|
||||
Feature #3921: Combat AI: aggro priorities
|
||||
Feature #3941: Allow starting at an unnamed exterior cell with --start
|
||||
Feature #3952: Add Visual Studio 2017 support
|
||||
Feature #3953: Combat AI: use "WhenUsed" enchantments
|
||||
Feature #4082: Leave the stack of ingredients or potions grabbed after using an ingredient/potion
|
||||
Task #2258: Windows installer: launch OpenMW tickbox
|
||||
Task #4152: The Windows CI script is moving files around that CMake should be dealing with
|
||||
|
||||
0.42.0
|
||||
------
|
||||
|
||||
|
|
|
@ -320,9 +320,9 @@ if [ -z $SKIP_DOWNLOAD ]; then
|
|||
"ffmpeg-3.2.4-dev-win${BITS}.zip"
|
||||
|
||||
# MyGUI
|
||||
download "MyGUI 3.2.3-git" \
|
||||
"http://www.lysator.liu.se/~ace/OpenMW/deps/MyGUI-3.2.3-git-msvc${MSVC_YEAR}-win${BITS}.7z" \
|
||||
"MyGUI-3.2.3-git-msvc${MSVC_YEAR}-win${BITS}.7z"
|
||||
download "MyGUI 3.2.2" \
|
||||
"http://www.lysator.liu.se/~ace/OpenMW/deps/MyGUI-3.2.2-msvc${MSVC_YEAR}-win${BITS}.7z" \
|
||||
"MyGUI-3.2.2-msvc${MSVC_YEAR}-win${BITS}.7z"
|
||||
|
||||
# OpenAL
|
||||
download "OpenAL-Soft 1.17.2" \
|
||||
|
@ -474,20 +474,20 @@ cd $DEPS
|
|||
echo
|
||||
|
||||
# MyGUI
|
||||
printf "MyGUI 3.2.3-git... "
|
||||
printf "MyGUI 3.2.2... "
|
||||
{
|
||||
cd $DEPS_INSTALL
|
||||
|
||||
if [ -d MyGUI ] && \
|
||||
grep "MYGUI_VERSION_MAJOR 3" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null && \
|
||||
grep "MYGUI_VERSION_MINOR 2" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null && \
|
||||
grep "MYGUI_VERSION_PATCH 3" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null
|
||||
grep "MYGUI_VERSION_PATCH 2" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null
|
||||
then
|
||||
printf "Exists. "
|
||||
elif [ -z $SKIP_EXTRACT ]; then
|
||||
rm -rf MyGUI
|
||||
eval 7z x -y "${DEPS}/MyGUI-3.2.3-git-msvc${MSVC_YEAR}-win${BITS}.7z" $STRIP
|
||||
mv "MyGUI-3.2.3-git-msvc${MSVC_YEAR}-win${BITS}" MyGUI
|
||||
eval 7z x -y "${DEPS}/MyGUI-3.2.2-msvc${MSVC_YEAR}-win${BITS}.7z" $STRIP
|
||||
mv "MyGUI-3.2.2-msvc${MSVC_YEAR}-win${BITS}" MyGUI
|
||||
fi
|
||||
|
||||
export MYGUI_HOME="$(real_pwd)/MyGUI"
|
||||
|
|
|
@ -57,7 +57,7 @@ endif()
|
|||
message(STATUS "Configuring OpenMW...")
|
||||
|
||||
set(OPENMW_VERSION_MAJOR 0)
|
||||
set(OPENMW_VERSION_MINOR 42)
|
||||
set(OPENMW_VERSION_MINOR 43)
|
||||
set(OPENMW_VERSION_RELEASE 0)
|
||||
|
||||
set(OPENMW_VERSION_COMMITHASH "")
|
||||
|
@ -472,16 +472,20 @@ if(WIN32)
|
|||
FILE(GLOB dll_files_release "${OpenMW_BINARY_DIR}/Release/*.dll")
|
||||
INSTALL(FILES ${dll_files_debug} DESTINATION "." CONFIGURATIONS Debug)
|
||||
INSTALL(FILES ${dll_files_release} DESTINATION "." CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel)
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" DESTINATION "." RENAME "openmw.cfg")
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/Debug/openmw.cfg.install" DESTINATION "." RENAME "openmw.cfg" CONFIGURATIONS Debug)
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/Release/openmw.cfg.install" DESTINATION "." RENAME "openmw.cfg" CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel)
|
||||
INSTALL(FILES "${OpenMW_SOURCE_DIR}/CHANGELOG.md" DESTINATION "." RENAME "CHANGELOG.txt")
|
||||
INSTALL(FILES "${OpenMW_SOURCE_DIR}/README.md" DESTINATION "." RENAME "README.txt")
|
||||
INSTALL(FILES "${OpenMW_SOURCE_DIR}/LICENSE" DESTINATION "." RENAME "LICENSE.txt")
|
||||
INSTALL(FILES
|
||||
"${OpenMW_SOURCE_DIR}/files/mygui/DejaVu Font License.txt"
|
||||
"${OpenMW_BINARY_DIR}/settings-default.cfg"
|
||||
"${OpenMW_BINARY_DIR}/tes3mp-client-default.cfg"
|
||||
"${OpenMW_BINARY_DIR}/gamecontrollerdb.txt"
|
||||
DESTINATION ".")
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/Debug/settings-default.cfg" DESTINATION "." CONFIGURATIONS Debug)
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/Release/settings-default.cfg" DESTINATION "." CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel)
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/Debug/tes3mp-client-default.cfg" DESTINATION "." CONFIGURATIONS Debug)
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/Release/tes3mp-client-default.cfg" DESTINATION "." CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel)
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/Debug/gamecontrollerdb.txt" DESTINATION "." CONFIGURATIONS Debug)
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/Release/gamecontrollerdb.txt" DESTINATION "." CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel)
|
||||
|
||||
if(BUILD_MYGUI_PLUGIN)
|
||||
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/Debug/Plugin_MyGUI_OpenMW_Resources.dll" DESTINATION "." CONFIGURATIONS Debug)
|
||||
|
@ -493,7 +497,9 @@ if(WIN32)
|
|||
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/Release/platforms" DESTINATION "." CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel)
|
||||
ENDIF()
|
||||
|
||||
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION ".")
|
||||
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/Debug/resources" DESTINATION "." CONFIGURATIONS Debug)
|
||||
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/Release/resources" DESTINATION "." CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel)
|
||||
|
||||
FILE(GLOB plugin_dir_debug "${OpenMW_BINARY_DIR}/Debug/osgPlugins-*")
|
||||
FILE(GLOB plugin_dir_release "${OpenMW_BINARY_DIR}/Release/osgPlugins-*")
|
||||
INSTALL(DIRECTORY ${plugin_dir_debug} DESTINATION "." CONFIGURATIONS Debug)
|
||||
|
|
|
@ -5,7 +5,8 @@ TES3MP
|
|||
|
||||
TES3MP is a project aiming to add multiplayer functionality to [OpenMW](https://github.com/OpenMW/openmw), a free and open source engine recreation of the popular Bethesda Softworks game "The Elder Scrolls III: Morrowind".
|
||||
|
||||
* Version: 0.7-alpha
|
||||
* TES3MP version: 0.7-alpha
|
||||
* OpenMW version: 0.43.0
|
||||
* License: GPLv3 (see [LICENSE](https://github.com/TES3MP/openmw-tes3mp/blob/master/LICENSE) for more information)
|
||||
|
||||
Font Licenses:
|
||||
|
@ -25,7 +26,7 @@ Contributing
|
|||
|
||||
Development has been relatively fast, but any contribution regarding [code](https://github.com/TES3MP/openmw-tes3mp/blob/master/CONTRIBUTING.md), documentation, bug hunting or video showcases is greatly appreciated.
|
||||
|
||||
Test sessions are often advertised in [our Steam group](https://steamcommunity.com/groups/mwmulti) or [our Discord server](https://discord.gg/ECJk293).
|
||||
Test sessions are often advertised on [our Discord server](https://discord.gg/ECJk293) or in [our Steam group](https://steamcommunity.com/groups/mwmulti).
|
||||
|
||||
Feel free to contact the [team members](https://github.com/TES3MP/openmw-tes3mp/blob/master/tes3mp-credits.md) for any questions you might have.
|
||||
|
||||
|
|
|
@ -252,7 +252,8 @@ endif()
|
|||
if (WIN32)
|
||||
target_link_libraries(openmw-cs ${Boost_LOCALE_LIBRARY})
|
||||
INSTALL(TARGETS openmw-cs RUNTIME DESTINATION ".")
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw-cs.cfg" DESTINATION ".")
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/Debug/openmw-cs.cfg" DESTINATION "." CONFIGURATIONS Debug)
|
||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/Release/openmw-cs.cfg" DESTINATION "." CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel)
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace MWGui
|
|||
{
|
||||
newSpell.mType = Spell::Type_Spell;
|
||||
std::string cost = std::to_string(spell->mData.mCost);
|
||||
std::string chance = std::to_string(int(MWMechanics::getSpellSuccessChance(spell, mActor)));
|
||||
std::string chance = std::to_string(int(MWMechanics::getSpellSuccessChance(spell, mActor, NULL, true, true)));
|
||||
newSpell.mCostColumn = cost + "/" + chance;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1237,6 +1237,46 @@ namespace MWMechanics
|
|||
}
|
||||
}
|
||||
|
||||
void Actors::updateCombatMusic ()
|
||||
{
|
||||
MWWorld::Ptr player = getPlayer();
|
||||
int hostilesCount = 0; // need to know this to play Battle music
|
||||
|
||||
for(PtrActorMap::iterator iter(mActors.begin()); iter != mActors.end(); ++iter)
|
||||
{
|
||||
if (!iter->first.getClass().getCreatureStats(iter->first).isDead())
|
||||
{
|
||||
bool inProcessingRange = (player.getRefData().getPosition().asVec3() - iter->first.getRefData().getPosition().asVec3()).length2()
|
||||
<= sqrAiProcessingDistance;
|
||||
|
||||
if (MWBase::Environment::get().getMechanicsManager()->isAIActive() && inProcessingRange)
|
||||
{
|
||||
if (iter->first != player)
|
||||
{
|
||||
MWMechanics::CreatureStats& stats = iter->first.getClass().getCreatureStats(iter->first);
|
||||
if (stats.getAiSequence().isInCombat() && !stats.isDead()) hostilesCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// check if we still have any player enemies to switch music
|
||||
static int currentMusic = 0;
|
||||
|
||||
if (currentMusic != 1 && hostilesCount == 0 && !(player.getClass().getCreatureStats(player).isDead() &&
|
||||
MWBase::Environment::get().getSoundManager()->isMusicPlaying()))
|
||||
{
|
||||
MWBase::Environment::get().getSoundManager()->playPlaylist(std::string("Explore"));
|
||||
currentMusic = 1;
|
||||
}
|
||||
else if (currentMusic != 2 && hostilesCount > 0)
|
||||
{
|
||||
MWBase::Environment::get().getSoundManager()->playPlaylist(std::string("Battle"));
|
||||
currentMusic = 2;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Actors::update (float duration, bool paused)
|
||||
{
|
||||
if(!paused)
|
||||
|
@ -1254,8 +1294,6 @@ namespace MWMechanics
|
|||
|
||||
MWWorld::Ptr player = getPlayer();
|
||||
|
||||
int hostilesCount = 0; // need to know this to play Battle music
|
||||
|
||||
/// \todo move update logic to Actor class where appropriate
|
||||
|
||||
std::map<const MWWorld::Ptr, const std::set<MWWorld::Ptr> > cachedAllies; // will be filled as engageCombat iterates
|
||||
|
@ -1408,8 +1446,6 @@ namespace MWMechanics
|
|||
CreatureStats &stats = iter->first.getClass().getCreatureStats(iter->first);
|
||||
if (isConscious(iter->first))
|
||||
stats.getAiSequence().execute(iter->first, *iter->second->getCharacterController(), iter->second->getAiState(), duration);
|
||||
|
||||
if (stats.getAiSequence().isInCombat() && !stats.isDead()) hostilesCount++;
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
@ -1485,21 +1521,6 @@ namespace MWMechanics
|
|||
|
||||
killDeadActors();
|
||||
|
||||
// check if we still have any player enemies to switch music
|
||||
static int currentMusic = 0;
|
||||
|
||||
if (currentMusic != 1 && hostilesCount == 0 && !(player.getClass().getCreatureStats(player).isDead() &&
|
||||
MWBase::Environment::get().getSoundManager()->isMusicPlaying()))
|
||||
{
|
||||
MWBase::Environment::get().getSoundManager()->playPlaylist(std::string("Explore"));
|
||||
currentMusic = 1;
|
||||
}
|
||||
else if (currentMusic != 2 && hostilesCount > 0)
|
||||
{
|
||||
MWBase::Environment::get().getSoundManager()->playPlaylist(std::string("Battle"));
|
||||
currentMusic = 2;
|
||||
}
|
||||
|
||||
static float sneakTimer = 0.f; // times update of sneak icon
|
||||
|
||||
// if player is in sneak state see if anyone detects him
|
||||
|
@ -1566,6 +1587,8 @@ namespace MWMechanics
|
|||
MWBase::Environment::get().getWindowManager()->setSneakVisibility(false);
|
||||
}
|
||||
}
|
||||
|
||||
updateCombatMusic();
|
||||
}
|
||||
|
||||
void Actors::killDeadActors()
|
||||
|
|
|
@ -81,6 +81,9 @@ namespace MWMechanics
|
|||
void dropActors (const MWWorld::CellStore *cellStore, const MWWorld::Ptr& ignore);
|
||||
///< Deregister all actors (except for \a ignore) in the given cell.
|
||||
|
||||
void updateCombatMusic();
|
||||
///< Update combat music state
|
||||
|
||||
void update (float duration, bool paused);
|
||||
///< Update actor stats and store desired velocity vectors in \a movement
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ namespace MWMechanics
|
|||
return castChance;
|
||||
}
|
||||
|
||||
float getSpellSuccessChance (const ESM::Spell* spell, const MWWorld::Ptr& actor, int* effectiveSchool, bool cap)
|
||||
float getSpellSuccessChance (const ESM::Spell* spell, const MWWorld::Ptr& actor, int* effectiveSchool, bool cap, bool checkMagicka)
|
||||
{
|
||||
bool godmode = actor == MWMechanics::getPlayer() && MWBase::Environment::get().getWorld()->getGodModeState();
|
||||
|
||||
|
@ -151,6 +151,9 @@ namespace MWMechanics
|
|||
if (spell->mData.mType != ESM::Spell::ST_Spell)
|
||||
return 100;
|
||||
|
||||
if (checkMagicka && stats.getMagicka().getCurrent() < spell->mData.mCost && !godmode)
|
||||
return 0;
|
||||
|
||||
if (spell->mData.mFlags & ESM::Spell::F_Always)
|
||||
return 100;
|
||||
|
||||
|
@ -165,11 +168,11 @@ namespace MWMechanics
|
|||
return std::max(0.f, std::min(100.f, castChance));
|
||||
}
|
||||
|
||||
float getSpellSuccessChance (const std::string& spellId, const MWWorld::Ptr& actor, int* effectiveSchool, bool cap)
|
||||
float getSpellSuccessChance (const std::string& spellId, const MWWorld::Ptr& actor, int* effectiveSchool, bool cap, bool checkMagicka)
|
||||
{
|
||||
const ESM::Spell* spell =
|
||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::Spell>().find(spellId);
|
||||
return getSpellSuccessChance(spell, actor, effectiveSchool, cap);
|
||||
return getSpellSuccessChance(spell, actor, effectiveSchool, cap, checkMagicka);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -31,11 +31,12 @@ namespace MWMechanics
|
|||
* @param actor calculate spell success chance for this actor (depends on actor's skills)
|
||||
* @param effectiveSchool the spell's effective school (relevant for skill progress) will be written here
|
||||
* @param cap cap the result to 100%?
|
||||
* @param checkMagicka check magicka?
|
||||
* @note actor can be an NPC or a creature
|
||||
* @return success chance from 0 to 100 (in percent), if cap=false then chance above 100 may be returned.
|
||||
*/
|
||||
float getSpellSuccessChance (const ESM::Spell* spell, const MWWorld::Ptr& actor, int* effectiveSchool = NULL, bool cap=true);
|
||||
float getSpellSuccessChance (const std::string& spellId, const MWWorld::Ptr& actor, int* effectiveSchool = NULL, bool cap=true);
|
||||
float getSpellSuccessChance (const ESM::Spell* spell, const MWWorld::Ptr& actor, int* effectiveSchool = NULL, bool cap=true, bool checkMagicka=false);
|
||||
float getSpellSuccessChance (const std::string& spellId, const MWWorld::Ptr& actor, int* effectiveSchool = NULL, bool cap=true, bool checkMagicka=false);
|
||||
|
||||
int getSpellSchool(const std::string& spellId, const MWWorld::Ptr& actor);
|
||||
int getSpellSchool(const ESM::Spell* spell, const MWWorld::Ptr& actor);
|
||||
|
|
|
@ -292,7 +292,7 @@ public:
|
|||
ostream << "# to its default, simply remove it from this file. For available" << std::endl;
|
||||
ostream << "# settings, see the file 'settings-default.cfg' or the documentation at:" << std::endl;
|
||||
ostream << "#" << std::endl;
|
||||
ostream << "# https://wiki.openmw.org/index.php?title=Settings" << std::endl;
|
||||
ostream << "# http://openmw.readthedocs.io/en/master/reference/modding/settings/index.html" << std::endl;
|
||||
}
|
||||
|
||||
// We still have one more thing to do before we're completely done writing the file.
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# ranges of recommended values. For detailed explanations of the
|
||||
# significance of each setting, interaction with other settings, hard
|
||||
# limits on value ranges and more information in general, please read
|
||||
# the detailed documentation at the OpenMW Wiki page:
|
||||
# the detailed documentation at:
|
||||
#
|
||||
# https://wiki.openmw.org/index.php?title=Settings
|
||||
# http://openmw.readthedocs.io/en/master/reference/modding/settings/index.html
|
||||
#
|
||||
|
||||
[Camera]
|
||||
|
|
Loading…
Reference in a new issue