Fix crash on startup

This commit is contained in:
teknomunk 2024-08-30 16:42:22 -05:00
parent 027b5cda00
commit 8f8f045905

View file

@ -239,7 +239,7 @@ local function handle_entity_collision(self, entity_def, projectile_def, entity)
-- Play sounds -- Play sounds
local sounds = (projectile_def.sounds or {}) local sounds = (projectile_def.sounds or {})
local sound = sounds.on_entity_collide or sounds.on_collision local sound = sounds.on_entity_collide or sounds.on_collision
if type(sound) == "function" then sound = sound(self, entity_def, projectile_def, entity) if type(sound) == "function" then sound = sound(self, entity_def, projectile_def, entity) end
if sound then if sound then
local arg2 = table.copy(sound[2]) local arg2 = table.copy(sound[2])
arg2.pos = pos arg2.pos = pos