mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
ACCESS: Workaround for original setting animations when none is loaded
This commit is contained in:
@@ -304,6 +304,8 @@ void AnimationManager::loadAnimations(Resource *res) {
|
||||
|
||||
Animation *AnimationManager::setAnimation(int animId) {
|
||||
Animation *anim = findAnimation(animId);
|
||||
if (!anim)
|
||||
return nullptr;
|
||||
|
||||
anim->_countdownTicks = anim->_initialTicks;
|
||||
anim->_frameNumber = 0;
|
||||
@@ -320,7 +322,7 @@ void AnimationManager::setAnimTimer(Animation *anim) {
|
||||
}
|
||||
|
||||
Animation *AnimationManager::findAnimation(int animId) {
|
||||
_animStart = _animation->getAnimation(animId);
|
||||
_animStart = (_animation == nullptr) ? nullptr : _animation->getAnimation(animId);
|
||||
return _animStart;
|
||||
}
|
||||
|
||||
|
||||
@@ -391,7 +391,9 @@ void Scripts::cmdCheckLoc() {
|
||||
void Scripts::cmdSetAnim() {
|
||||
int animId = _data->readByte();
|
||||
Animation *anim = _vm->_animation->setAnimation(animId);
|
||||
_vm->_animation->setAnimTimer(anim);
|
||||
|
||||
if (anim)
|
||||
_vm->_animation->setAnimTimer(anim);
|
||||
}
|
||||
|
||||
void Scripts::cmdDispInv() {
|
||||
|
||||
Reference in New Issue
Block a user