equal
deleted
inserted
replaced
|
1 /* $Id$ */ |
|
2 |
|
3 /** @file ai_execmode.cpp class to switch the AI to Execute mode */ |
|
4 |
|
5 #include "ai_execmode.hpp" |
|
6 |
|
7 bool AIExecMode::ModeProc(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc) |
|
8 { |
|
9 /* In execution mode we only return 'true', telling the DoCommand it |
|
10 * should continue with the real execution of the command. */ |
|
11 return true; |
|
12 } |
|
13 |
|
14 AIExecMode::AIExecMode() |
|
15 { |
|
16 this->last_mode = this->GetDoCommandMode(); |
|
17 this->SetDoCommandMode(&AIExecMode::ModeProc); |
|
18 } |
|
19 |
|
20 AIExecMode::~AIExecMode() |
|
21 { |
|
22 this->SetDoCommandMode(this->last_mode); |
|
23 } |