If there's a cloud in this cell that we know should be gone, remove it. Returns true if a cloud was removed.
| 307 | /// If there's a cloud in this cell that we know should be gone, remove it. |
| 308 | /// Returns true if a cloud was removed. |
| 309 | bool map_cell::update_cloud_state() |
| 310 | { |
| 311 | if (visible()) |
| 312 | return false; // we're already up-to-date |
| 313 | |
| 314 | // player non-opaque clouds vanish instantly out of los |
| 315 | if (_cloud && _cloud->killer == KILL_YOU_MISSILE |
| 316 | && !is_opaque_cloud(_cloud->type)) |
| 317 | { |
| 318 | clear_cloud(); |
| 319 | return true; |
| 320 | } |
| 321 | |
| 322 | // still winds KOs all clouds, even those out of LOS |
| 323 | if (_cloud && env.level_state & LSTATE_STILL_WINDS) |
| 324 | { |
| 325 | clear_cloud(); |
| 326 | return true; |
| 327 | } |
| 328 | |
| 329 | // TODO: track decay & vanish appropriately (based on some worst case?) |
| 330 | return false; |
| 331 | } |
| 332 | |
| 333 | /** |
| 334 | * Find the known map bounds as a pair of coordinates. This is a minimal |
no test coverage detected