remove a structure from the map
| 4540 | |
| 4541 | //remove a structure from the map |
| 4542 | static void removeStructFromMap(STRUCTURE *psStruct) |
| 4543 | { |
| 4544 | auxStructureNonblocking(psStruct); |
| 4545 | |
| 4546 | /* set tiles drawing */ |
| 4547 | StructureBounds b = getStructureBounds(psStruct); |
| 4548 | for (int j = 0; j < b.size.y; ++j) |
| 4549 | { |
| 4550 | for (int i = 0; i < b.size.x; ++i) |
| 4551 | { |
| 4552 | MAPTILE *psTile = mapTile(b.map.x + i, b.map.y + j); |
| 4553 | if (psTile->psObject == psStruct) |
| 4554 | { |
| 4555 | psTile->psObject = nullptr; |
| 4556 | auxClearBlocking(b.map.x + i, b.map.y + j, AIR_BLOCKED); |
| 4557 | } |
| 4558 | } |
| 4559 | } |
| 4560 | } |
| 4561 | |
| 4562 | // remove a structure from a game without any visible effects |
| 4563 | // bDestroy = true if the object is to be destroyed |
no test coverage detected