[Scummvm-cvs-logs] CVS: scummvm object.cpp,1.20,1.21
Ludvig Strigeus
strigeus at users.sourceforge.net
Sat Dec 29 05:20:32 CET 2001
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv16769
Modified Files:
object.cpp
Log Message:
workaround to prevent crashes in the indy4 world map (seems to be a bug in indy4's scripts)
Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/object.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** object.cpp 2001/12/29 12:45:54 1.20
--- object.cpp 2001/12/29 13:19:53 1.21
***************
*** 711,714 ****
--- 711,716 ----
int Scumm::getObjX(int obj) {
if (obj < NUM_ACTORS) {
+ if (obj==0)
+ return 0; /* fix for indy4's map */
return derefActorSafe(obj,"getObjX")->x;
} else {
***************
*** 722,725 ****
--- 724,729 ----
int Scumm::getObjY(int obj) {
if (obj < NUM_ACTORS) {
+ if (obj==0)
+ return 0; /* fix for indy4's map */
return derefActorSafe(obj,"getObjY")->y;
} else {
More information about the Scummvm-git-logs
mailing list