| 42 | } |
| 43 | |
| 44 | void Doodad::remove(GameState &state) |
| 45 | { |
| 46 | auto thisPtr = shared_from_this(); |
| 47 | this->tileObject->removeFromMap(); |
| 48 | this->tileObject = nullptr; |
| 49 | for (auto &city : state.cities) |
| 50 | { |
| 51 | city.second->doodads.remove(thisPtr); |
| 52 | } |
| 53 | if (state.current_battle) |
| 54 | state.current_battle->doodads.remove(thisPtr); |
| 55 | } |
| 56 | |
| 57 | void Doodad::setPosition(Vec3<float> position) |
| 58 | { |
no test coverage detected