| 6 | IMPLEMENT(Set_RandomSeed); |
| 7 | |
| 8 | bool Set_RandomSeed::execute(aithread &thread) const |
| 9 | { |
| 10 | // Parameter |
| 11 | DWORD dwRandomSeed; |
| 12 | thread.readTuple( std::tie(dwRandomSeed) ); |
| 13 | |
| 14 | // Set random seed (the noob way) |
| 15 | srand(dwRandomSeed); |
| 16 | |
| 17 | // Save debug info and return |
| 18 | thread.saveDebug(Text::Green, this->getOpcode(), "%X", dwRandomSeed); |
| 19 | return true; |
| 20 | } |