Commit Graph

2 Commits

Author SHA1 Message Date
Bill Currie 06f410b0b6 [renderer] Clear the visibility components on scene reset
I don't know why it didn't happen during the demo loop, but going from
the start map to e1m1 caused a segfault due to the efrags for a lava
ball getting double freed (however, I do think it might be because the
ball passed through at least two leafs, while entities in the demos did
not). The double free was because SCR_NewScene (indirectly) freed all
the efrags without removing them from entities, and then the client code
deleting the entities caused the visibility components to get deleted
and thus the efrags freed a second time. Using ECS_RemoveEntities on the
visibility component ensures the entities don't have a visibility
component to remove when they are later deleted.
2022-11-17 22:12:41 +09:00
Bill Currie 7c53a68ad7 [scene] Move efrag code from renderer to scene
While culling is very much part of rendering, it's more scene related
than renderer related.

Fixes the transform test failing to link.
2022-11-14 12:43:33 +09:00
Renamed from libs/video/renderer/r_efrag.c (Browse further)