| 273 | } |
| 274 | |
| 275 | void CCustomDetectorSHOC::AddRemoveMapSpot(CCustomZone* pZone, bool bAdd) |
| 276 | { |
| 277 | if (m_ZoneTypeMap.find(pZone->CLS_ID) == m_ZoneTypeMap.end()) |
| 278 | return; |
| 279 | |
| 280 | if (bAdd && !pZone->VisibleByDetector()) |
| 281 | return; |
| 282 | |
| 283 | ZONE_TYPE_SHOC& zone_type = m_ZoneTypeMap[pZone->CLS_ID]; |
| 284 | |
| 285 | if (xr_strlen(zone_type.zone_map_location)) |
| 286 | { |
| 287 | if (bAdd && pZone->IsEnabled()) |
| 288 | { |
| 289 | if (!Level().MapManager().HasMapLocation(*zone_type.zone_map_location, pZone->ID())) |
| 290 | Level().MapManager().AddMapLocation(*zone_type.zone_map_location, pZone->ID()); |
| 291 | } |
| 292 | else |
| 293 | { |
| 294 | if (Level().MapManager().HasMapLocation(*zone_type.zone_map_location, pZone->ID())) |
| 295 | Level().MapManager().RemoveMapLocation(*zone_type.zone_map_location, pZone->ID()); |
| 296 | } |
| 297 | } |
| 298 | } |
| 299 | |
| 300 | void CCustomDetectorSHOC::UpdateMapLocations() // called on turn on/off only |
| 301 | { |
nothing calls this directly
no test coverage detected