aboutsummaryrefslogtreecommitdiff
path: root/engines/gnap/character.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gnap/character.cpp')
-rw-r--r--engines/gnap/character.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/gnap/character.cpp b/engines/gnap/character.cpp
index 114c2f4adf..3d74d1e300 100644
--- a/engines/gnap/character.cpp
+++ b/engines/gnap/character.cpp
@@ -1208,7 +1208,9 @@ void PlayerPlat::updateIdleSequence() {
}
void PlayerPlat::updateIdleSequence2() {
- if (_actionStatus < 0 && _vm->_gnap->_actionStatus < 0) {
+ PlayerGnap& gnap = *_vm->_gnap;
+
+ if (_actionStatus < 0 && gnap._actionStatus < 0) {
if (_vm->_timers[0]) {
if (!_vm->_timers[1]) {
_vm->_timers[1] = _vm->getRandom(20) + 30;
@@ -1268,6 +1270,7 @@ int PlayerPlat::getWalkSequenceId(int deltaX, int deltaY) {
bool PlayerPlat::walkTo(Common::Point gridPos, int animationIndex, int sequenceId, int flags) {
int datNum = flags & 3;
+ PlayerGnap& gnap = *_vm->_gnap;
_vm->_timers[1] = 60;
@@ -1282,8 +1285,8 @@ bool PlayerPlat::walkTo(Common::Point gridPos, int animationIndex, int sequenceI
_walkDestX = CLIP(gridX, 0, _vm->_gridMaxX - 1);
_walkDestY = CLIP(gridY, 0, _vm->_gridMaxY - 1);
- if (animationIndex >= 0 && _vm->_gnap->_pos == Common::Point(_walkDestX, _walkDestY))
- _vm->_gnap->walkStep();
+ if (animationIndex >= 0 && gnap._pos == Common::Point(_walkDestX, _walkDestY))
+ gnap.walkStep();
bool done = findPath1(_pos.x, _pos.y, 0);