diff --git a/mods/lib_mount/init.lua b/mods/lib_mount/init.lua index 00e901da..809dc30e 100644 --- a/mods/lib_mount/init.lua +++ b/mods/lib_mount/init.lua @@ -22,8 +22,7 @@ lib_mount = { passengers = {} } -local enable_crash = true -local crash_threshold = 6.5 -- ignored if enable_crash=false +local crash_threshold = 6.5 -- ignored if enable_crash is disabled ------------------------------------------------------------------------------ @@ -210,7 +209,7 @@ end local aux_timer = 0 -function lib_mount.drive(entity, dtime, is_mob, moving_anim, stand_anim, jump_height, can_fly, can_go_down, can_go_up) +function lib_mount.drive(entity, dtime, is_mob, moving_anim, stand_anim, jump_height, can_fly, can_go_down, can_go_up, enable_crash) aux_timer = aux_timer + dtime if can_fly and can_fly == true then diff --git a/mods/vehicle_mash/framework.lua b/mods/vehicle_mash/framework.lua index 7792cdcc..5348e99f 100644 --- a/mods/vehicle_mash/framework.lua +++ b/mods/vehicle_mash/framework.lua @@ -26,6 +26,7 @@ function vehicle_mash.register_vehicle(name, def) passenger3_eye_offset = def.passenger3_eye_offset, passenger3_detach_pos_offset = def.passenger3_detach_pos_offset, + enable_crash = def.enable_crash or true, visual = def.visual, mesh = def.mesh, textures = def.textures, @@ -139,7 +140,7 @@ function vehicle_mash.register_vehicle(name, def) end end, on_step = function(self, dtime) - drive(self, dtime, false, nil, nil, 0, def.can_fly, def.can_go_down, def.can_go_up) + drive(self, dtime, false, nil, nil, 0, def.can_fly, def.can_go_down, def.can_go_up, def.enable_crash) end })