mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 05:53:50 +00:00
Merge branch 'master' into empty-string
This commit is contained in:
commit
5df95b95f2
4 changed files with 42 additions and 12 deletions
|
@ -207,6 +207,8 @@
|
||||||
Bug #5300: NPCs don't switch from torch to shield when starting combat
|
Bug #5300: NPCs don't switch from torch to shield when starting combat
|
||||||
Bug #5308: World map copying makes save loading much slower
|
Bug #5308: World map copying makes save loading much slower
|
||||||
Bug #5313: Node properties of identical type are not applied in the correct order
|
Bug #5313: Node properties of identical type are not applied in the correct order
|
||||||
|
Bug #5326: Formatting issues in the settings.cfg
|
||||||
|
Bug #5328: Skills aren't properly reset for dead actors
|
||||||
Bug #5345: Dopey Necromancy does not work due to a missing quote
|
Bug #5345: Dopey Necromancy does not work due to a missing quote
|
||||||
Feature #1774: Handle AvoidNode
|
Feature #1774: Handle AvoidNode
|
||||||
Feature #2229: Improve pathfinding AI
|
Feature #2229: Improve pathfinding AI
|
||||||
|
|
|
@ -1850,6 +1850,8 @@ namespace MWMechanics
|
||||||
stats.getActiveSpells().visitEffectSources(soulTrap);
|
stats.getActiveSpells().visitEffectSources(soulTrap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Magic effects will be reset later, and the magic effect that could kill the actor
|
||||||
|
// needs to be determined now
|
||||||
calculateCreatureStatModifiers(iter->first, 0);
|
calculateCreatureStatModifiers(iter->first, 0);
|
||||||
|
|
||||||
if (cls.isEssential(iter->first))
|
if (cls.isEssential(iter->first))
|
||||||
|
@ -1867,7 +1869,10 @@ namespace MWMechanics
|
||||||
// Make sure spell effects are removed
|
// Make sure spell effects are removed
|
||||||
purgeSpellEffects(stats.getActorId());
|
purgeSpellEffects(stats.getActorId());
|
||||||
|
|
||||||
|
// Reset dynamic stats, attributes and skills
|
||||||
calculateCreatureStatModifiers(iter->first, 0);
|
calculateCreatureStatModifiers(iter->first, 0);
|
||||||
|
if (iter->first.getClass().isNpc())
|
||||||
|
calculateNpcStatModifiers(iter->first, 0);
|
||||||
|
|
||||||
if( iter->first == getPlayer())
|
if( iter->first == getPlayer())
|
||||||
{
|
{
|
||||||
|
|
|
@ -269,6 +269,9 @@ void HeadAnimationTime::setBlinkStop(float value)
|
||||||
NpcAnimation::NpcType NpcAnimation::getNpcType()
|
NpcAnimation::NpcType NpcAnimation::getNpcType()
|
||||||
{
|
{
|
||||||
const MWWorld::Class &cls = mPtr.getClass();
|
const MWWorld::Class &cls = mPtr.getClass();
|
||||||
|
// Dead vampires should typically stay vampires.
|
||||||
|
if (mNpcType == Type_Vampire && cls.getNpcStats(mPtr).isDead() && !cls.getNpcStats(mPtr).isWerewolf())
|
||||||
|
return mNpcType;
|
||||||
NpcAnimation::NpcType curType = Type_Normal;
|
NpcAnimation::NpcType curType = Type_Normal;
|
||||||
if (cls.getCreatureStats(mPtr).getMagicEffects().get(ESM::MagicEffect::Vampirism).getMagnitude() > 0)
|
if (cls.getCreatureStats(mPtr).getMagicEffects().get(ESM::MagicEffect::Vampirism).getMagnitude() > 0)
|
||||||
curType = Type_Vampire;
|
curType = Type_Vampire;
|
||||||
|
|
|
@ -77,6 +77,9 @@ void Settings::SettingsFileParser::saveSettingsFile(const std::string& file, con
|
||||||
// Were there any lines at all in the file?
|
// Were there any lines at all in the file?
|
||||||
bool existing = false;
|
bool existing = false;
|
||||||
|
|
||||||
|
// Is an entirely blank line queued to be added?
|
||||||
|
bool emptyLineQueued = false;
|
||||||
|
|
||||||
// The category/section we're currently in.
|
// The category/section we're currently in.
|
||||||
std::string currentCategory;
|
std::string currentCategory;
|
||||||
|
|
||||||
|
@ -100,12 +103,22 @@ void Settings::SettingsFileParser::saveSettingsFile(const std::string& file, con
|
||||||
// The current character position in the line.
|
// The current character position in the line.
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
|
|
||||||
// Don't add additional newlines at the end of the file.
|
// An empty line was queued.
|
||||||
|
if (emptyLineQueued)
|
||||||
|
{
|
||||||
|
emptyLineQueued = false;
|
||||||
|
// We're still going through the current category, so we should copy it.
|
||||||
|
if (currentCategory.empty() || istream.eof() || line[i] != '[')
|
||||||
|
ostream << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Don't add additional newlines at the end of the file otherwise.
|
||||||
if (istream.eof()) continue;
|
if (istream.eof()) continue;
|
||||||
|
|
||||||
// Copy entirely blank lines.
|
// Queue entirely blank lines to add them if desired.
|
||||||
if (!skipWhiteSpace(i, line)) {
|
if (!skipWhiteSpace(i, line))
|
||||||
ostream << line << std::endl;
|
{
|
||||||
|
emptyLineQueued = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,9 +141,13 @@ void Settings::SettingsFileParser::saveSettingsFile(const std::string& file, con
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!currentCategory.empty())
|
||||||
|
{
|
||||||
// Ensure that all options in the current category have been written.
|
// Ensure that all options in the current category have been written.
|
||||||
for (CategorySettingStatusMap::iterator mit = written.begin(); mit != written.end(); ++mit) {
|
for (CategorySettingStatusMap::iterator mit = written.begin(); mit != written.end(); ++mit)
|
||||||
if (mit->second == false && mit->first.first == currentCategory) {
|
{
|
||||||
|
if (mit->second == false && mit->first.first == currentCategory)
|
||||||
|
{
|
||||||
Log(Debug::Verbose) << "Added new setting: [" << currentCategory << "] "
|
Log(Debug::Verbose) << "Added new setting: [" << currentCategory << "] "
|
||||||
<< mit->first.second << " = " << settings.at(mit->first);
|
<< mit->first.second << " = " << settings.at(mit->first);
|
||||||
ostream << mit->first.second << " = " << settings.at(mit->first) << std::endl;
|
ostream << mit->first.second << " = " << settings.at(mit->first) << std::endl;
|
||||||
|
@ -138,6 +155,9 @@ void Settings::SettingsFileParser::saveSettingsFile(const std::string& file, con
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Add an empty line after the last option in a category.
|
||||||
|
ostream << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
// Update the current category.
|
// Update the current category.
|
||||||
currentCategory = line.substr(i+1, end - (i+1));
|
currentCategory = line.substr(i+1, end - (i+1));
|
||||||
|
|
Loading…
Reference in a new issue