| 72 | } |
| 73 | |
| 74 | void InitializeSpotCamSequences(bool startFirstSequence) |
| 75 | { |
| 76 | TrackCameraInit = false; |
| 77 | |
| 78 | CameraCnt.clear(); |
| 79 | SpotCamRemap.clear(); |
| 80 | |
| 81 | if (SpotCam.empty()) |
| 82 | return; |
| 83 | |
| 84 | int currentSequence = SpotCam[0].sequence; |
| 85 | int count = 0; |
| 86 | |
| 87 | for (const auto& cam : SpotCam) |
| 88 | { |
| 89 | if (cam.sequence != currentSequence) |
| 90 | { |
| 91 | SpotCamRemap[currentSequence] = (int)CameraCnt.size(); |
| 92 | CameraCnt.push_back(count); |
| 93 | currentSequence = cam.sequence; |
| 94 | count = 0; |
| 95 | } |
| 96 | |
| 97 | count++; |
| 98 | } |
| 99 | |
| 100 | SpotCamRemap[currentSequence] = (int)CameraCnt.size(); |
| 101 | CameraCnt.push_back(count); |
| 102 | |
| 103 | if (startFirstSequence && SpotCamRemap.count(0)) |
| 104 | { |
| 105 | InitializeSpotCam(0); |
| 106 | UseSpotCam = true; |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | void InitializeSpotCam(short Sequence) |
| 111 | { |