mirror of
https://github.com/scummvm/scummvm.git
synced 2026-11-18 21:34:48 +00:00
ACCESS: Workaround for original setting animations when none is loaded
This commit is contained in:
1 parent
60ee5456c9
commit
968bfec067
2 files changed
+6
-2
No files matched your search
@@ -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