| 280 | } recent_units; |
| 281 | |
| 282 | static void on_new_active_unit(color_ostream& out, void* data) { |
| 283 | int32_t unit_id = reinterpret_cast<std::intptr_t>(data); |
| 284 | DEBUG(event,out).print("unit {} has arrived on map\n", unit_id); |
| 285 | recent_units.add(unit_id); |
| 286 | } |
| 287 | |
| 288 | static EventManager::EventHandler new_unit_handler(plugin_self, on_new_active_unit, RECENT_UNITS_SCAN_CYCLE); |
| 289 |