fix entity removal

This commit is contained in:
MihailRis
2024-06-29 21:20:12 +03:00
parent d22948f45c
commit f42cd9e567
3 changed files with 6 additions and 5 deletions
+1
View File
@@ -4,5 +4,6 @@ end
function on_grounded()
entity.transform:set_rot(mat4.rotate({0, 1, 0}, math.random()*360))
print(stdcomp)
entity:despawn()
end
-4
View File
@@ -40,10 +40,6 @@ return {
return entity
end,
remove_Entity = function(eid)
local entity = entities[eid]
if entity and entity.on_despawn then
entity.on_despawn()
end
entities[eid] = nil;
end
}