mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
Removed asserts
This commit is contained in:
parent
138fb4e29a
commit
7e4a0c2478
2 changed files with 3 additions and 6 deletions
|
@ -160,7 +160,6 @@ namespace MWGui
|
|||
|
||||
void LoadingScreen::setProgress (size_t value)
|
||||
{
|
||||
assert(value < mProgressBar->getScrollRange());
|
||||
if (value - mProgress < mProgressBar->getScrollRange()/100.f)
|
||||
return;
|
||||
mProgress = value;
|
||||
|
@ -174,7 +173,6 @@ namespace MWGui
|
|||
mProgressBar->setScrollPosition(0);
|
||||
size_t value = mProgress + increase;
|
||||
mProgress = value;
|
||||
assert(mProgress < mProgressBar->getScrollRange());
|
||||
mProgressBar->setTrackSize(value / (float)(mProgressBar->getScrollRange()) * mProgressBar->getLineSize());
|
||||
draw();
|
||||
}
|
||||
|
|
|
@ -224,7 +224,8 @@ void MWState::StateManager::saveGame (const std::string& description, const Slot
|
|||
MWBase::Environment::get().getWindowManager()->write(writer, listener);
|
||||
|
||||
// Ensure we have written the number of records that was estimated
|
||||
assert (writer.getRecordCount() == recordCount+1); // 1 extra for TES3 record
|
||||
if (writer.getRecordCount() != recordCount+1) // 1 extra for TES3 record
|
||||
std::cerr << "Warning: number of written savegame records does not match. Estimated: " << recordCount+1 << ", written: " << writer.getRecordCount() << std::endl;
|
||||
|
||||
writer.close();
|
||||
|
||||
|
@ -272,9 +273,7 @@ void MWState::StateManager::loadGame (const Character *character, const Slot *sl
|
|||
|
||||
Loading::Listener& listener = *MWBase::Environment::get().getWindowManager()->getLoadingScreen();
|
||||
|
||||
// FIXME: +1 is actually not needed, but older savegames had an off-by-one error with the record count
|
||||
// So we leave this in for now so that these old savegames still work
|
||||
listener.setProgressRange(reader.getRecordCount()+1);
|
||||
listener.setProgressRange(reader.getRecordCount());
|
||||
listener.setLabel("#{sLoadingMessage14}");
|
||||
|
||||
Loading::ScopedLoad load(&listener);
|
||||
|
|
Loading…
Reference in a new issue