Commit c06e9cf
fix: skip GPU model removal on restart to avoid swap-remove corruption
remove_sprite_model does a swap-remove internally, so iterating a
pre-collected list of chain_ids hits wrong slots after the first
removal, leaving orphaned models in the GPU. New asteroids after
restart get fresh chain_ids from the growing registry and are safely
added to the GPU; the old orphaned models are never referenced again.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 file changed
Lines changed: 6 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 29 | + | |
35 | 30 | | |
36 | 31 | | |
37 | 32 | | |
| |||
247 | 242 | | |
248 | 243 | | |
249 | 244 | | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
268 | 250 | | |
269 | 251 | | |
270 | 252 | | |
271 | 253 | | |
272 | 254 | | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | 255 | | |
277 | 256 | | |
278 | | - | |
279 | | - | |
280 | 257 | | |
281 | 258 | | |
282 | 259 | | |
| |||
0 commit comments