Quickfix a crash

This commit is contained in:
kay27 2022-02-16 18:55:18 +04:00
parent 7de4b56cf6
commit a909819881
1 changed files with 8 additions and 6 deletions

View File

@ -28,12 +28,14 @@ mobs.shoot_projectile_handling = function(arrow_item, pos, dir, yaw, shooter, po
obj:set_acceleration({x=0, y=gravity, z=0}) obj:set_acceleration({x=0, y=gravity, z=0})
obj:set_yaw(yaw-math.pi/2) obj:set_yaw(yaw-math.pi/2)
local le = obj:get_luaentity() local le = obj:get_luaentity()
if le then
le._shooter = shooter le._shooter = shooter
le._damage = damage le._damage = damage
le._is_critical = is_critical le._is_critical = is_critical
le._startpos = pos le._startpos = pos
le._knockback = knockback le._knockback = knockback
le._collectable = collectable le._collectable = collectable
end
--play custom shoot sound --play custom shoot sound
if shooter and shooter.shoot_sound then if shooter and shooter.shoot_sound then