[Scummvm-cvs-logs] SF.net SVN: scummvm: [29950] scummvm/trunk/engines/lure/room.cpp
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Sat Dec 22 12:34:10 CET 2007
Revision: 29950
http://scummvm.svn.sourceforge.net/scummvm/?rev=29950&view=rev
Author: dreammaster
Date: 2007-12-22 03:34:10 -0800 (Sat, 22 Dec 2007)
Log Message:
-----------
Bugfix to not allow animation fast forward when restoring a game - it was causing occasional crashes due to tick handlers referencing animations not yet loaded (it's only meant to be done during room changes)
Modified Paths:
--------------
scummvm/trunk/engines/lure/room.cpp
Modified: scummvm/trunk/engines/lure/room.cpp
===================================================================
--- scummvm/trunk/engines/lure/room.cpp 2007-12-22 11:24:29 UTC (rev 29949)
+++ scummvm/trunk/engines/lure/room.cpp 2007-12-22 11:34:10 UTC (rev 29950)
@@ -583,15 +583,19 @@
loadRoomHotspots();
- if ((_roomData->exitTime != 0xffff) && (_roomData->exitTime != 0)) {
- // If time has passed, animation ticks needed before room is displayed
- int numSeconds = (g_system->getMillis() - _roomData->exitTime) / 1000;
- if (numSeconds > 300) numSeconds = 300;
+ if (leaveFlag) {
+ // A previous room has been left - check if there are any seconds worth
+ // of animations that need to be done in 'fast forward'
+ if ((_roomData->exitTime != 0xffff) && (_roomData->exitTime != 0)) {
+ // If time has passed, animation ticks needed before room is displayed
+ int numSeconds = (g_system->getMillis() - _roomData->exitTime) / 1000;
+ if (numSeconds > 300) numSeconds = 300;
- game.preloadFlag() = true;
- while (numSeconds-- > 0)
- game.tick();
- game.preloadFlag() = false;
+ game.preloadFlag() = true;
+ while (numSeconds-- > 0)
+ game.tick();
+ game.preloadFlag() = false;
+ }
}
game.tick();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list