* Make a deviator missile explosion on the given position, of a certain type. All units in the * given radius may become deviated. * @param type The type of explosion. * @param position The position of the explosion. * @param radius The radius. * @param houseID House controlling the deviator. */
| 640 | * @param houseID House controlling the deviator. |
| 641 | */ |
| 642 | void Map_DeviateArea(uint16 type, tile32 position, uint16 radius, uint8 houseID) |
| 643 | { |
| 644 | PoolFindStruct find; |
| 645 | |
| 646 | Explosion_Start(type, position); |
| 647 | |
| 648 | find.type = 0xFFFF; |
| 649 | find.index = 0xFFFF; |
| 650 | find.houseID = HOUSE_INVALID; |
| 651 | |
| 652 | while (true) { |
| 653 | Unit *u; |
| 654 | |
| 655 | u = Unit_Find(&find); |
| 656 | |
| 657 | if (u == NULL) break; |
| 658 | if (Tile_GetDistance(position, u->o.position) / 16 >= radius) continue; |
| 659 | |
| 660 | Unit_Deviate(u, 0, houseID); |
| 661 | } |
| 662 | } |
| 663 | |
| 664 | /** |
| 665 | * Perform a bloom explosion, filling the area with spice. |
no test coverage detected