1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00

Merge branch 'cleanup' into 'master'

Remove constant conditions

See merge request OpenMW/openmw!1527
This commit is contained in:
psi29a 2022-01-05 10:48:13 +00:00
commit bafde5c9c4

View File

@ -1,7 +1,6 @@
#include "creaturestats.hpp" #include "creaturestats.hpp"
#include "esmreader.hpp" #include "esmreader.hpp"
#include "esmwriter.hpp" #include "esmwriter.hpp"
#include "savedgame.hpp"
#include <limits> #include <limits>
@ -183,9 +182,7 @@ void ESM::CreatureStats::save (ESMWriter &esm) const
for (int i=0; i<3; ++i) for (int i=0; i<3; ++i)
mDynamic[i].save (esm); mDynamic[i].save (esm);
if (ESM::SavedGame::sCurrentFormat <= 18 && mMissingACDT) if (mGoldPool)
esm.writeHNT("GOLD", std::numeric_limits<int>::min());
else if(mGoldPool)
esm.writeHNT("GOLD", mGoldPool); esm.writeHNT("GOLD", mGoldPool);
if (mTradeTime.mDay != 0 || mTradeTime.mHour != 0) if (mTradeTime.mDay != 0 || mTradeTime.mHour != 0)
@ -258,7 +255,7 @@ void ESM::CreatureStats::save (ESMWriter &esm) const
for (int i=0; i<4; ++i) for (int i=0; i<4; ++i)
mAiSettings[i].save(esm); mAiSettings[i].save(esm);
} }
if(ESM::SavedGame::sCurrentFormat > 18 && mMissingACDT) if (mMissingACDT)
esm.writeHNT("NOAC", mMissingACDT); esm.writeHNT("NOAC", mMissingACDT);
} }