mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-21 08:11:29 +00:00
Merge pull request #2745 from Capostrophic/fever
Fix some serious oversights caused by my fever
This commit is contained in:
commit
d6d8ed2137
2 changed files with 6 additions and 5 deletions
|
@ -1871,6 +1871,7 @@ namespace MWMechanics
|
||||||
|
|
||||||
// Reset dynamic stats, attributes and skills
|
// Reset dynamic stats, attributes and skills
|
||||||
calculateCreatureStatModifiers(iter->first, 0);
|
calculateCreatureStatModifiers(iter->first, 0);
|
||||||
|
if (iter->first.getClass().isNpc())
|
||||||
calculateNpcStatModifiers(iter->first, 0);
|
calculateNpcStatModifiers(iter->first, 0);
|
||||||
|
|
||||||
if( iter->first == getPlayer())
|
if( iter->first == getPlayer())
|
||||||
|
|
|
@ -103,18 +103,18 @@ 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.
|
|
||||||
if (istream.eof()) continue;
|
|
||||||
|
|
||||||
// An empty line was queued.
|
// An empty line was queued.
|
||||||
if (emptyLineQueued)
|
if (emptyLineQueued)
|
||||||
{
|
{
|
||||||
emptyLineQueued = false;
|
emptyLineQueued = false;
|
||||||
// We're still going through the current category, so we should copy it.
|
// We're still going through the current category, so we should copy it.
|
||||||
if (currentCategory.empty() || line[i] != '[')
|
if (currentCategory.empty() || istream.eof() || line[i] != '[')
|
||||||
ostream << std::endl;
|
ostream << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Don't add additional newlines at the end of the file otherwise.
|
||||||
|
if (istream.eof()) continue;
|
||||||
|
|
||||||
// Queue entirely blank lines to add them if desired.
|
// Queue entirely blank lines to add them if desired.
|
||||||
if (!skipWhiteSpace(i, line))
|
if (!skipWhiteSpace(i, line))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue