diff options
author | Nipun Garg | 2019-07-22 00:19:58 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:26 +0200 |
commit | 7d4c665176d08e3cd7badede8877c3f661f36aba (patch) | |
tree | c41c254bf0703f2f00dc0593916a63e5fbe2a575 /engines | |
parent | d4f927f338d4d221de59a04c85f9286a0a505528 (diff) | |
download | scummvm-rg350-7d4c665176d08e3cd7badede8877c3f661f36aba.tar.gz scummvm-rg350-7d4c665176d08e3cd7badede8877c3f661f36aba.tar.bz2 scummvm-rg350-7d4c665176d08e3cd7badede8877c3f661f36aba.zip |
HDB: Fix LIGHTBARREL in Slime & moving floats
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/ai-funcs.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp index b114390549..77485f7bf0 100644 --- a/engines/hdb/ai-funcs.cpp +++ b/engines/hdb/ai-funcs.cpp @@ -1197,6 +1197,7 @@ void AI::animateEntity(AIEntity *e) { addAnimateTarget(e->x, e->y, 0, 3, ANIM_NORMAL, false, false, GROUP_STEAM_PUFF_SIT); removeEntity(e); g_hdb->_sound->playSound(SND_BARREL_MELTING); + return; } } } else if ((flags & kFlagLightMelt) && e->type == AI_LIGHTBARREL) { @@ -1237,11 +1238,12 @@ void AI::animateEntity(AIEntity *e) { return; } else { // Make it float and splash in water + e->state = STATE_FLOATING; addAnimateTarget(e->x, e->y, 0, 3, ANIM_NORMAL, false, false, GROUP_WATER_SPLASH_SIT); floatEntity(e, STATE_FLOATING); g_hdb->_sound->playSound(SND_SPLASH); - return; } + } // If it is floating downstream, keep moving it if (flags & (kFlagPushRight | kFlagPushLeft | kFlagPushUp | kFlagPushDown)) { @@ -1306,7 +1308,6 @@ void AI::animateEntity(AIEntity *e) { e->moveSpeed = kPushMoveSpeed >> 1; setEntityGoal(e, e->tileX + xv, e->tileY + yv); e->state = state; - } } } } else if (((flags = g_hdb->_map->getMapBGTileFlags(e->tileX, e->tileY)) & kFlagWater) && (e->type == AI_MAGIC_EGG || e->type == AI_ICE_BLOCK)) { |