diff options
author | Paul Gilbert | 2016-01-07 18:11:24 +1100 |
---|---|---|
committer | Paul Gilbert | 2016-01-07 18:11:24 +1100 |
commit | cf5856492c6ce1820339dd76f9d3175f9f457215 (patch) | |
tree | 01fa705a0eaca65dd9f4e1bc9f0582c5c1afc365 /engines/mads/nebular/game_nebular.cpp | |
parent | a330d993ae6b216b223d1acada2652ed23286490 (diff) | |
download | scummvm-rg350-cf5856492c6ce1820339dd76f9d3175f9f457215.tar.gz scummvm-rg350-cf5856492c6ce1820339dd76f9d3175f9f457215.tar.bz2 scummvm-rg350-cf5856492c6ce1820339dd76f9d3175f9f457215.zip |
MADS: Phantom: Flesh out walk triggers
Diffstat (limited to 'engines/mads/nebular/game_nebular.cpp')
-rw-r--r-- | engines/mads/nebular/game_nebular.cpp | 76 |
1 files changed, 37 insertions, 39 deletions
diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp index c4b7f57281..9c0acf1a47 100644 --- a/engines/mads/nebular/game_nebular.cpp +++ b/engines/mads/nebular/game_nebular.cpp @@ -827,51 +827,49 @@ void GameNebular::step() { if (_player._visible && _player._stepEnabled && !_player._moving && (_player._facing == _player._turnToFacing)) { if (_scene._frameStartTime >= (uint32)_globals[kWalkerTiming]) { - if (!_player._stopWalkerIndex) { - int randomVal = _vm->getRandomNumber(29999); - if (_globals[kSexOfRex] == REX_MALE) { - switch (_player._facing) { - case FACING_SOUTHWEST: - case FACING_SOUTHEAST: - case FACING_NORTHWEST: - case FACING_NORTHEAST: - if (randomVal < 200) { - _player.addWalker(-1, 0); + int randomVal = _vm->getRandomNumber(29999); + if (_globals[kSexOfRex] == REX_MALE) { + switch (_player._facing) { + case FACING_SOUTHWEST: + case FACING_SOUTHEAST: + case FACING_NORTHWEST: + case FACING_NORTHEAST: + if (randomVal < 200) { + _player.addWalker(-1, 0); + _player.addWalker(1, 0); + } + break; + + case FACING_WEST: + case FACING_EAST: + if (randomVal < 500) { + for (int count = 0; count < 10; ++count) { _player.addWalker(1, 0); } - break; - - case FACING_WEST: - case FACING_EAST: - if (randomVal < 500) { - for (int count = 0; count < 10; ++count) { - _player.addWalker(1, 0); - } + } + break; + + case FACING_SOUTH: + if (randomVal < 500) { + for (int count = 0; count < 10; ++count) { + _player.addWalker((randomVal < 250) ? 1 : 2, 0); } - break; - - case FACING_SOUTH: - if (randomVal < 500) { - for (int count = 0; count < 10; ++count) { - _player.addWalker((randomVal < 250) ? 1 : 2, 0); - } - } else if (randomVal < 750) { - for (int count = 0; count < 5; ++count) { - _player.addWalker(1, 0); - } - - _player.addWalker(0, 0); - _player.addWalker(0, 0); - - for (int count = 0; count < 5; ++count) { - _player.addWalker(2, 0); - } + } else if (randomVal < 750) { + for (int count = 0; count < 5; ++count) { + _player.addWalker(1, 0); } - break; - default: - break; + _player.addWalker(0, 0); + _player.addWalker(0, 0); + + for (int count = 0; count < 5; ++count) { + _player.addWalker(2, 0); + } } + break; + + default: + break; } } |