DIRECTOR: fix setting width and height to puppet sprites

This commit is contained in:
ysj1173886760 2021-06-26 19:57:42 +08:00 committed by Eugene Sandulenko
parent 787454f908
commit ced3a58b10

View File

@ -398,13 +398,13 @@ void Channel::replaceSprite(Sprite *nextSprite) {
void Channel::setWidth(int w) {
if (_sprite->_puppet && _sprite->_stretch) {
_width = w;
_width = MAX<int>(w, 0);
}
}
void Channel::setHeight(int h) {
if (_sprite->_puppet && _sprite->_stretch) {
_height = h;
_height = MAX<int>(h, 0);
}
}