[Scummvm-cvs-logs] SF.net SVN: scummvm: [24688] scummvm/trunk/engines/lure/res_struct.cpp
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Sun Nov 12 05:42:41 CET 2006
Revision: 24688
http://svn.sourceforge.net/scummvm/?rev=24688&view=rev
Author: dreammaster
Date: 2006-11-11 20:42:37 -0800 (Sat, 11 Nov 2006)
Log Message:
-----------
Bugfix to prevent player freezing in place after bumping into another character
Modified Paths:
--------------
scummvm/trunk/engines/lure/res_struct.cpp
Modified: scummvm/trunk/engines/lure/res_struct.cpp
===================================================================
--- scummvm/trunk/engines/lure/res_struct.cpp 2006-11-12 04:39:10 UTC (rev 24687)
+++ scummvm/trunk/engines/lure/res_struct.cpp 2006-11-12 04:42:37 UTC (rev 24688)
@@ -798,7 +798,7 @@
srcCharId = SrcCharId;
destCharId = DestCharId;
counter = IDLE_COUNTDOWN_SIZE;
- charHotspot = Resources::getReference().getHotspot(SrcCharId);
+ charHotspot = Resources::getReference().getHotspot(DestCharId);
assert(charHotspot);
}
@@ -868,19 +868,22 @@
// Scan through the pause list to see if there's a record for the
// calling character and the impinging list entry
- for (i = res.pausedList().begin(); i != res.pausedList().end(); ++i) {
+ bool foundEntry = false;
+ for (i = res.pausedList().begin(); !foundEntry && (i != res.pausedList().end()); ++i) {
PausedCharacter *rec = *i;
- if ((rec->srcCharId == charId) &&
- (rec->destCharId == hotspot->hotspotId()))
- break;
+ foundEntry = (rec->srcCharId == charId) &&
+ (rec->destCharId == hotspot->hotspotId());
}
- if (i != res.pausedList().end())
+ if (foundEntry)
// There was, so move to next impinging character entry
continue;
if ((hotspot->hotspotId() == PLAYER_ID) && !hotspot->coveredFlag())
+ {
+ hotspot->updateMovement();
return 1;
+ }
// Add a new paused character entry
PausedCharacter *entry = new PausedCharacter(charId, hotspot->hotspotId());
@@ -892,9 +895,9 @@
((charHotspot->pauseCtr() == 0) &&
(charHotspot->characterMode() == CHARMODE_NONE))) {
hotspot->resource()->use2HotspotId = charId;
- } else {
- hotspot->setPauseCtr(IDLE_COUNTDOWN_SIZE);
}
+
+ hotspot->setPauseCtr(IDLE_COUNTDOWN_SIZE);
}
result = 2;
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