update
This commit is contained in:
parent
708a098edb
commit
19ebf2bad2
2 changed files with 4 additions and 4 deletions
|
@ -22,8 +22,7 @@ lib_mount = {
|
||||||
passengers = {}
|
passengers = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
local enable_crash = true
|
local crash_threshold = 6.5 -- ignored if enable_crash is disabled
|
||||||
local crash_threshold = 6.5 -- ignored if enable_crash=false
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -210,7 +209,7 @@ end
|
||||||
|
|
||||||
local aux_timer = 0
|
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
|
aux_timer = aux_timer + dtime
|
||||||
|
|
||||||
if can_fly and can_fly == true then
|
if can_fly and can_fly == true then
|
||||||
|
|
|
@ -26,6 +26,7 @@ function vehicle_mash.register_vehicle(name, def)
|
||||||
passenger3_eye_offset = def.passenger3_eye_offset,
|
passenger3_eye_offset = def.passenger3_eye_offset,
|
||||||
passenger3_detach_pos_offset = def.passenger3_detach_pos_offset,
|
passenger3_detach_pos_offset = def.passenger3_detach_pos_offset,
|
||||||
|
|
||||||
|
enable_crash = def.enable_crash or true,
|
||||||
visual = def.visual,
|
visual = def.visual,
|
||||||
mesh = def.mesh,
|
mesh = def.mesh,
|
||||||
textures = def.textures,
|
textures = def.textures,
|
||||||
|
@ -139,7 +140,7 @@ function vehicle_mash.register_vehicle(name, def)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
on_step = function(self, dtime)
|
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
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue