| 353 | } |
| 354 | |
| 355 | bool CCameraManager::ProcessCameraEffector(CEffectorCam* eff) |
| 356 | { |
| 357 | // Do NOT delete effector here! It's unsafe because: |
| 358 | // 1. Leads to failed iterators in UpdateCamEffectors |
| 359 | // 2. Child classes with overrided ProcessCameraEffector would be surprised if eff becames invalid pointer |
| 360 | // The best way - return 'false' when the effector should be deleted, and delete it in ProcessCameraEffector |
| 361 | |
| 362 | bool res = false; |
| 363 | if (eff->Valid() && eff->ProcessCam(m_cam_info)) |
| 364 | { |
| 365 | res = true; |
| 366 | } |
| 367 | else if (eff->AllowProcessingIfInvalid()) |
| 368 | { |
| 369 | eff->ProcessIfInvalid(m_cam_info); |
| 370 | } |
| 371 | return res; |
| 372 | } |
| 373 | |
| 374 | void CCameraManager::UpdateCamEffectors() |
| 375 | { |
nothing calls this directly
no test coverage detected