TOON: Bug #3153351 fixed with disappearing Drew

Bug #3153351: "TOON: Drew vanishes when fixing churnatron"
Made sure the scale is never zero.

svn-id: r55399
This commit is contained in:
Sylvain Dupont 2011-01-21 23:24:17 +00:00
parent 8cacde95e7
commit f9422fb726

View File

@ -52,7 +52,9 @@ void CharacterDrew::setPosition(int32 x, int32 y) {
debugC(5, kDebugCharacter, "setPosition(%d, %d)", x, y);
_z = _vm->getLayerAtPoint(x, y);
_scale = _vm->getScaleAtPoint(x, y);
int newScale = _vm->getScaleAtPoint(x, y);
if (newScale > 0)
_scale = newScale;
// work out position and scale of the character sprite
int32 width = _walkAnim->getWidth() * _scale / 1024;