| 7 | Debug fatal_error_impl(AISCRIPT::Enum::FATAL_ERROR); |
| 8 | |
| 9 | bool Debug::execute(aithread &thread) const |
| 10 | { |
| 11 | // Perform independant behaviours |
| 12 | if ( this->getOpcode() == AISCRIPT::Enum::FATAL_ERROR ) |
| 13 | { |
| 14 | // Message |
| 15 | Broodwar->sendText("Illegal AI script executed."); |
| 16 | |
| 17 | // Debug |
| 18 | thread.saveDebug(Text::Green, this->getOpcode()); |
| 19 | |
| 20 | // Kill the script |
| 21 | thread.killThread(); |
| 22 | thread.noretry(); |
| 23 | return false; |
| 24 | } |
| 25 | else if ( this->getOpcode() == AISCRIPT::Enum::DEBUG ) |
| 26 | { |
| 27 | // Read parameters |
| 28 | WORD wJump; |
| 29 | thread.readTuple( std::tie( wJump) ); |
| 30 | |
| 31 | // Send the message |
| 32 | Broodwar->sendText("%s", &pbAIScriptBinary[thread.getScriptOffset()] ); |
| 33 | |
| 34 | // Jump to offset |
| 35 | thread.setScriptOffset(wJump); |
| 36 | thread.saveDebug(Text::Green, this->getOpcode(), "p_%X %s", wJump, &pbAIScriptBinary[thread.getScriptOffset()]); |
| 37 | } |
| 38 | return true; |
| 39 | } |
nothing calls this directly
no test coverage detected