From 8c0496194a19bc7e2f8e974863b94d7785b1fad5 Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Wed, 15 Oct 2003 08:46:04 +0000 Subject: [PATCH] fix personMove / cutaway problem svn-id: r10807 --- queen/cutaway.cpp | 12 ++++++------ queen/walk.cpp | 11 ++++++----- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/queen/cutaway.cpp b/queen/cutaway.cpp index d70da67214a..67b0bd6c641 100644 --- a/queen/cutaway.cpp +++ b/queen/cutaway.cpp @@ -640,21 +640,21 @@ void Cutaway::handlePersonRecord( _logic->personSetData( object.objectNumber - _logic->roomData(object.room), "", true, &p); - +#if 0 debug(0, "Moving person '%s' (%i) = actor '%s' to (%i,%i)", _logic->objectName(object.objectNumber), object.objectNumber, p.name, object.moveToX, object.moveToY); - +#endif strcpy(name, p.name); - if (object.moveToX || object.moveToY) { + if (object.bobStartX || object.bobStartY) { BobSlot *bob = _graphics->bob(p.actor->bobNum); bob->scale = 100; // XXX SF; - bob->x = object.moveToX; - bob->y = object.moveToY; + bob->x = object.bobStartX; + bob->y = object.bobStartY; } -#if 0 +#if 1 _walk->personMove( &p, object.moveToX, object.moveToY, diff --git a/queen/walk.cpp b/queen/walk.cpp index 2205f27b6f0..775593d0801 100644 --- a/queen/walk.cpp +++ b/queen/walk.cpp @@ -26,6 +26,7 @@ namespace Queen { + const MovePersonData Walk::_moveData[] = { {"COMPY", -1, -6, 1, 6, 0, 0, 0, 0,12,12,1,14}, {"DEINO", -1, -8, 1, 8, 0, 0, 0, 0,11,11,1,10}, @@ -299,8 +300,6 @@ void Walk::animatePerson(const MovePersonData *mpd, uint16 image, uint16 bobNum, } - - void Walk::joeMove(int direction, uint16 endx, uint16 endy, bool inCutaway) { // CAN=0 @@ -341,9 +340,13 @@ void Walk::joeMove(int direction, uint16 endx, uint16 endy, bool inCutaway) { } - void Walk::personMove(const Person *pp, uint16 endx, uint16 endy, uint16 curImage, int direction) { + if (endx == 0 && endy == 0) { + warning("Walk::personMove() - endx == 0 && endy == 0"); + return; + } + // TODO: room 69 specific // CAN = 0; @@ -571,7 +574,6 @@ bool Walk::calcPath(uint16 oldArea, uint16 newArea) { } } } - // CAN = -1 if no connection is made, else 0 return _areaList[1] != 0; } @@ -602,5 +604,4 @@ void Walk::incWalkData(uint16 px, uint16 py, uint16 x, uint16 y, uint16 area) { } - } // End of namespace Queen