Commit c5b18fe
authored
fix: vehicle class exclusion broken when kindOf list is empty (#81)
* fix: vehicle class exclusion check failing when kindOf exclusion list is empty
The `_vic` variable (reference to the vehicle being checked) was declared
inside the `excludeKindFromRecord` conditional block. When that setting
was empty, the block never executed, leaving `_vic` undefined. The
subsequent `excludeClassFromRecord` check silently failed because
`typeOf nil` returns "" which never matches any class name.
This caused ACE_friesAnchorBar entities (and any other class-excluded
vehicles) to be recorded despite being in the exclusion list, resulting
in phantom black helicopter icons overlapping real helicopters in
playback.
Also sync the excludeClassFromRecord default value to include
WeaponHolderSimulated as the setting description already documents.
* perf: cache parseSimpleArray results for exclude checks
Avoid calling parseSimpleArray twice per setting (once for the emptiness
check, once for forEach) on every vehicle every frame.1 parent 9ccbe8f commit c5b18fe
2 files changed
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
183 | 184 | | |
184 | | - | |
185 | | - | |
| 185 | + | |
| 186 | + | |
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
190 | | - | |
| 191 | + | |
191 | 192 | | |
192 | 193 | | |
193 | | - | |
| 194 | + | |
| 195 | + | |
194 | 196 | | |
195 | 197 | | |
196 | 198 | | |
197 | 199 | | |
198 | | - | |
| 200 | + | |
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
| |||
0 commit comments