1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 16:29:55 +00:00

pass time on OnTrainingFinished callback instead of before the fadeScreenIn

This commit is contained in:
Dave Corley 2023-07-01 08:48:57 +00:00 committed by psi29a
parent 2b11c2cf36
commit dfa4f5da8a
3 changed files with 8 additions and 6 deletions

View file

@ -61,6 +61,7 @@ Programmers
crussell187 crussell187
Dan Vukelich (sanchezman) Dan Vukelich (sanchezman)
darkf darkf
Dave Corley (S3ctor)
David Cernat (davidcernat) David Cernat (davidcernat)
Declan Millar (declan-millar) Declan Millar (declan-millar)
devnexen devnexen

View file

@ -31,6 +31,7 @@
Bug #6939: OpenMW-CS: ID columns are too short Bug #6939: OpenMW-CS: ID columns are too short
Bug #6949: Sun Damage effect doesn't work in quasi exteriors Bug #6949: Sun Damage effect doesn't work in quasi exteriors
Bug #6964: Nerasa Dralor Won't Follow Bug #6964: Nerasa Dralor Won't Follow
Bug #6973: Fade in happens after the scene load and is shown
Bug #6974: Only harmful effects are reflected Bug #6974: Only harmful effects are reflected
Bug #6977: Sun damage implementation does not match research Bug #6977: Sun damage implementation does not match research
Bug #6986: Sound magic effect does not make noise Bug #6986: Sound magic effect does not make noise

View file

@ -170,17 +170,13 @@ namespace MWGui
MWMechanics::NpcStats& npcStats = mPtr.getClass().getNpcStats(mPtr); MWMechanics::NpcStats& npcStats = mPtr.getClass().getNpcStats(mPtr);
npcStats.setGoldPool(npcStats.getGoldPool() + price); npcStats.setGoldPool(npcStats.getGoldPool() + price);
// advance time
MWBase::Environment::get().getMechanicsManager()->rest(2, false);
MWBase::Environment::get().getWorld()->advanceTime(2);
setVisible(false); setVisible(false);
mProgressBar.setVisible(true); mProgressBar.setVisible(true);
mProgressBar.setProgress(0, 2); mProgressBar.setProgress(0, 2);
mTimeAdvancer.run(2); mTimeAdvancer.run(2);
MWBase::Environment::get().getWindowManager()->fadeScreenOut(0.25); MWBase::Environment::get().getWindowManager()->fadeScreenOut(0.2);
MWBase::Environment::get().getWindowManager()->fadeScreenIn(0.25, false, 0.25); MWBase::Environment::get().getWindowManager()->fadeScreenIn(0.2, false, 0.2);
} }
void TrainingWindow::onTrainingProgressChanged(int cur, int total) void TrainingWindow::onTrainingProgressChanged(int cur, int total)
@ -192,6 +188,10 @@ namespace MWGui
{ {
mProgressBar.setVisible(false); mProgressBar.setVisible(false);
// advance time
MWBase::Environment::get().getMechanicsManager()->rest(2, false);
MWBase::Environment::get().getWorld()->advanceTime(2);
// go back to game mode // go back to game mode
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Training); MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Training);
MWBase::Environment::get().getWindowManager()->exitCurrentGuiMode(); MWBase::Environment::get().getWindowManager()->exitCurrentGuiMode();