mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-06 02:46:49 +00:00
MADS: Fix player/sprite setup/teardown for scene 112
This commit is contained in:
parent
ec9c7166ab
commit
48f49eeb80
@ -274,8 +274,8 @@ void Game::sectionLoop() {
|
||||
_vm->_events->waitCursor();
|
||||
_kernelMode = KERNEL_ROOM_PRELOAD;
|
||||
|
||||
delete _scene._animationData;
|
||||
_scene._animationData = nullptr;
|
||||
delete _scene._activeAnimation;
|
||||
_scene._activeAnimation = nullptr;
|
||||
|
||||
_scene._reloadSceneFlag = false;
|
||||
|
||||
|
@ -201,6 +201,10 @@ void Player::selectSeries() {
|
||||
_mirror = true;
|
||||
}
|
||||
|
||||
// If the user isn't to be present (such as for a cutscene), exit immediately
|
||||
if ((_spritesStart + _spritesIdx) < 0)
|
||||
return;
|
||||
|
||||
SpriteAsset &spriteSet = *scene._sprites[_spritesStart + _spritesIdx];
|
||||
assert(spriteSet._charInfo);
|
||||
_velocity = MAX(spriteSet._charInfo->_velocity, 100);
|
||||
@ -219,6 +223,9 @@ void Player::selectSeries() {
|
||||
}
|
||||
|
||||
void Player::updateFrame() {
|
||||
if ((_spritesStart + _spritesIdx) < 0)
|
||||
return;
|
||||
|
||||
Scene &scene = _vm->_game->_scene;
|
||||
SpriteAsset &spriteSet = *scene._sprites[_spritesStart + _spritesIdx];
|
||||
assert(spriteSet._charInfo);
|
||||
@ -490,6 +497,9 @@ void Player::idle() {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((_spritesStart + _spritesIdx) < 0)
|
||||
return;
|
||||
|
||||
SpriteAsset &spriteSet = *scene._sprites[_spritesStart + _spritesIdx];
|
||||
assert(spriteSet._charInfo);
|
||||
if (spriteSet._charInfo->_numEntries == 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user