mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 02:11:19 +00:00
[ruamoko] Clear efrags when destroying an entity
This ensures the rendering system won't attempt to draw the entity after it has been destroyed.
This commit is contained in:
parent
91c877b1a1
commit
ea8f991bf3
1 changed files with 2 additions and 0 deletions
|
@ -257,6 +257,8 @@ bi_Scene_DestroyEntity (progs_t *pr, void *_res)
|
|||
pr_ulong_t id = P_ULONG (pr, 0);
|
||||
entity_t *ent = rua_entity_get (res, id);
|
||||
pr_ulong_t scene_id = id & 0xffffffff;
|
||||
|
||||
R_RemoveEfrags (ent);
|
||||
// bad scene caught above
|
||||
rua_scene_t *scene = rua_scene_get (res, scene_id);
|
||||
Scene_DestroyEntity (scene->scene, ent);
|
||||
|
|
Loading…
Reference in a new issue