TSAGE: In Blue Force, cursor doesn't reset to Walk after doing actions

This commit is contained in:
Paul Gilbert 2011-09-18 16:33:09 +10:00
parent 83a03d883d
commit 45ee4f4845
2 changed files with 32 additions and 24 deletions

View File

@ -2987,22 +2987,28 @@ void Player::enableControl() {
_canWalk = true;
_uiEnabled = true;
_enabled = true;
_globals->_events.setCursor(CURSOR_WALK);
switch (_globals->_events.getCursor()) {
case CURSOR_WALK:
case CURSOR_LOOK:
case CURSOR_USE:
case CURSOR_TALK:
_globals->_events.setCursor(_globals->_events.getCursor());
break;
default:
if (_vm->getGameID() == GType_Ringworld) {
_globals->_events.setCursor(CURSOR_WALK);
break;
}
if ((_vm->getGameID() == GType_BlueForce) && BF_GLOBALS._uiElements._active)
BF_GLOBALS._uiElements.show();
switch (_globals->_events.getCursor()) {
case CURSOR_WALK:
case CURSOR_LOOK:
case CURSOR_USE:
case CURSOR_TALK:
_globals->_events.setCursor(_globals->_events.getCursor());
break;
default:
_globals->_events.setCursor(CURSOR_WALK);
break;
}
} else {
CursorType cursor = _globals->_events.getCursor();
_globals->_events.setCursor(cursor);
if (BF_GLOBALS._uiElements._active)
BF_GLOBALS._uiElements.show();
}
}
void Player::process(Event &event) {
@ -3845,17 +3851,19 @@ void SceneHandler::process(Event &event) {
event.handled = _globals->_events.getCursor() != CURSOR_WALK;
if (_globals->_player._uiEnabled && _globals->_player._canWalk &&
(_globals->_events.getCursor() != CURSOR_LOOK)) {
_globals->_events.setCursor(CURSOR_WALK);
} else if (_globals->_player._canWalk && (_globals->_events.getCursor() != CURSOR_LOOK)) {
_globals->_events.setCursor(CURSOR_WALK);
} else if (_globals->_player._uiEnabled && (_globals->_events.getCursor() != CURSOR_LOOK)) {
_globals->_events.setCursor(CURSOR_USE);
}
if ((_vm->getGameID() == GType_Ringworld) || (_globals->_events.getCursor() == CURSOR_9999)) {
if (_globals->_player._uiEnabled && _globals->_player._canWalk &&
(_globals->_events.getCursor() != CURSOR_LOOK)) {
_globals->_events.setCursor(CURSOR_WALK);
} else if (_globals->_player._canWalk && (_globals->_events.getCursor() != CURSOR_LOOK)) {
_globals->_events.setCursor(CURSOR_WALK);
} else if (_globals->_player._uiEnabled && (_globals->_events.getCursor() != CURSOR_LOOK)) {
_globals->_events.setCursor(CURSOR_USE);
}
if (_vm->getGameID() == GType_BlueForce)
event.handled = true;
if (_vm->getGameID() == GType_BlueForce)
event.handled = true;
}
break;
}
}

View File

@ -84,7 +84,7 @@ enum CursorType {
// Cursors
CURSOR_WALK = 0x100, CURSOR_LOOK = 0x200, CURSOR_700 = 700, CURSOR_USE = 0x400, CURSOR_TALK = 0x800,
CURSOR_1000 = 0x1000, CURSOR_EXIT = 0x7004,
CURSOR_1000 = 0x1000, CURSOR_EXIT = 0x7004, CURSOR_9999 = 9999,
CURSOR_NONE = -1, CURSOR_CROSSHAIRS = -2, CURSOR_ARROW = -3
};