mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
MM: MM1: Don't freeze like original in rest if attributes reach 0
This commit is contained in:
parent
9a6378a106
commit
06655e124b
@ -586,27 +586,22 @@ void Character::rest() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fun fact: in the original if any of the attributes reach zero,
|
||||||
|
// then it jumps to an instruction that jumps to itself, freezing the game.
|
||||||
|
// For ScummVM, I just limit the minimum to 1 instead
|
||||||
if (_age >= 60) {
|
if (_age >= 60) {
|
||||||
// Fun fact: in the original if any of the attributes
|
_might._current = MAX(_might._current - 1, 1);
|
||||||
// reach zero, then it jumps to an instruction that
|
_endurance._current = MAX(_endurance._current - 1, 1);
|
||||||
// jumps to itself, freezing the game.
|
_speed._current = MAX(_speed._current - 1, 1);
|
||||||
if (--_might._current == 0 ||
|
}
|
||||||
--_endurance._current == 0 ||
|
if (_age >= 70) {
|
||||||
--_speed._current == 0)
|
_might._current = MAX(_might._current - 1, 1);
|
||||||
error("Attributes bottomed out during rest");
|
_endurance._current = MAX(_endurance._current - 1, 1);
|
||||||
|
_speed._current = MAX(_speed._current - 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
if (_age >= 70) {
|
if (_age >= 80) {
|
||||||
if (--_might._current == 0 ||
|
_might._current = MAX((int)_might._current - 2, 1);
|
||||||
--_endurance._current == 0 ||
|
|
||||||
--_speed._current == 0)
|
|
||||||
error("Attributes bottomed out during rest");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_age >= 80) {
|
|
||||||
if (_might._current <= 2)
|
|
||||||
error("Attributes bottomed out during rest");
|
|
||||||
_might._current -= 2;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_food > 0) {
|
if (_food > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user