Skip to content

Commit

Permalink
WAGE: Implement handleAimCommand()
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Feb 14, 2016
1 parent 2dc5841 commit 0237486
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions engines/wage/script.cpp
Expand Up @@ -1145,8 +1145,25 @@ void Script::handleDropCommand(const char *target) {
}
}

void Script::handleAimCommand(const char *target) {
warning("STUB: handleAimCommand");
void Script::handleAimCommand(const char *t) {
bool wasHandled = true;
Common::String target(t);

if (target.contains("head")) {
_callbacks->_aim = Chr::HEAD;
} else if (target.contains("chest")) {
_callbacks->_aim = Chr::CHEST;
} else if (target.contains("side")) {
_callbacks->_aim = Chr::SIDE;
} else {
wasHandled = false;
appendText((char *)"Please aim for the head, chest, or side.");
}

if (wasHandled)
_handled = true;

_callbacks->_commandWasQuick = true;
}

void Script::handleWearCommand(const char *target) {
Expand Down

0 comments on commit 0237486

Please sign in to comment.