CMI: Actor scale experiment (don't apply)
|Reported by:||eriktorbjorn||Owned by:||fingolfin|
|Cc:||Game:||Monkey Island 3|
This is an attempt to document what's known about the bug that, among other things, causes Dinghy Dog to shrink after he bites you. The patch is not meant to be applied, but points at the general area where the problem may be.
Dinghy Dog spends most of his time in walkbox 0, with ignoreBoxes set to 1. Ordinarily the latter would keep him from being scaled at all.
Somewhere along the way, SO_ACTOR_DEFAULT is invoked, which causes ignoreBoxes to be set to 0.
While ignoreBoxes is 0, SO_ACTOR_COSTUME is invoked. This calls setActorCostume(), which calls showActor(), which calls adjustActorPos(), which calls setBox(), which puts him in walkbox 7 and scales him to the appropriate size for this box.
Later he's put back in box 0 again, but at this point ignoreBoxes has been set to 1 again, so he won't be scaled back.
My first idea was to remove the ignoreBoxes check from setupActorScale, but this caused Murray to be drawn unscaled in the same room. This is clearly the wrong behaviour. What the patch does is simply to keep SO_ACTOR_DEFAULT from changing ignoreBoxes, but even if this turns out to be the correct solution, it's a hacky implementation.
Ticket imported from: #696033. Ticket imported from: patches/287.