Permalink
Browse files

STARTREK: "Use" action was bypassing "disableWalk"

When objects could be walked to by "using" them, this bypassed the
"disableWalk" variable.
  • Loading branch information...
Drenn1 authored and sev- committed Jul 10, 2018
1 parent 2f3c4b9 commit 2771797eb0cb93b6a7672904dd81f9deeecdba0d
Showing with 2 additions and 1 deletion.
  1. +2 −1 engines/startrek/awaymission.cpp
@@ -515,7 +515,8 @@ void StarTrekEngine::handleAwayMissionAction() {
if (action.activeObject() != action.passiveObject()) {
switch (action.activeObject()) {
case OBJECT_KIRK:
if (!_room->handleAction(ACTION_WALK, action.passiveObject(), 0, 0)
// BUGFIX: Don't allow the "use" action to bypass the "disableWalking" variable
if (!(!_awayMission.disableWalking && _room->handleAction(ACTION_WALK, action.passiveObject(), 0, 0))
&& !_room->handleAction(ACTION_GET, action.passiveObject(), 0, 0)) {
showTextbox("Capt. Kirk", getLoadedText(GROUNDTX_KIRK_USE), 20, 20, TEXTCOLOR_YELLOW, 0);
}

0 comments on commit 2771797

Please sign in to comment.