[Scummvm-devel] Could this be the explanation for the CMI walkbox bugs?

Max Horn max at quendi.de
Tue Feb 4 02:10:01 CET 2003


At 8:38 Uhr +0100 04.02.2003, torbjorn.e.andersson at tietoenator.com wrote:
>I tried looking into the CMI walkbox problems. Specifically not being able
>to pick up the cup in the cannibal village. From what I can see, when you
>try to pick the cup up your actor tries to move to a spot which *should* be
>inside a walkbox, but it still gets adjusted out of that box.
>
>On a hunch, I added the following lines to the end of getBoxCoordinates():
>
>         // CMI triggers some of these on some boxes. That can't be right...
>         if (box->ul.x > box->ur.x) printf("ul.x > ur.x !!!\n");
>         if (box->ll.x > box->lr.x) printf("ll.x > lr.x !!!\n");
>         if (box->ul.y > box->ll.y) printf("ul.y > ll.y !!!\n");
>         if (box->ur.y > box->lr.y) printf("ur.y > lr.y !!!\n");
>
>And it turns out that CMI triggers some of these cases for some boxes.
>Unless I'm making some boneheaded mistake, that means that what we think are
>the upper/lower left/right corners of the box aren't always, and any code
>that assumes they are will break badly.
>
>Maybe the solution is as simple as fixing getBoxCoordinates() to assign the
>appropriate coordinates to the appropriate corners...?


Before you investigate further, did you verify that they are *not* 
triggered in other games?

Max




More information about the Scummvm-devel mailing list