diff options
Diffstat (limited to 'engines/cge2')
-rw-r--r-- | engines/cge2/cge2_main.cpp | 2 | ||||
-rw-r--r-- | engines/cge2/spare.cpp | 10 |
2 files changed, 1 insertions, 11 deletions
diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp index d9d22c84b1..9a736efdf0 100644 --- a/engines/cge2/cge2_main.cpp +++ b/engines/cge2/cge2_main.cpp @@ -370,7 +370,7 @@ void CGE2Engine::loadScript(const char *fname) { int n = _spare->count(); if (_spare->locate(_sprite->_ref) == nullptr) - _spare->store(_sprite); + _spare->dispose(_sprite); _sprite = nullptr; if (_spare->count() == n) error("Durplicated reference! %s", SpN); diff --git a/engines/cge2/spare.cpp b/engines/cge2/spare.cpp index 63e85e8ed6..9531fe68f2 100644 --- a/engines/cge2/spare.cpp +++ b/engines/cge2/spare.cpp @@ -87,16 +87,6 @@ void Spare::dispose(Sprite *spr) { if (spr) { _vm->_vga->_showQ->remove(spr); update(spr->contract()); - if (!_vm->isHero(spr)) { - for (uint i = 0; i < _container.size(); ++i) { - if (spr == _container[i]) { - _container.remove_at(i); - delete spr; - spr = nullptr; - break; - } - } - } } } |