added tire sound
parent
31a19923b3
commit
a5ef3b5b8b
|
@ -406,6 +406,20 @@ function ju52.testImpact(self, velocity, position)
|
|||
end
|
||||
end
|
||||
|
||||
if impact > 1 then
|
||||
local noded = mobkit.nodeatpos(mobkit.pos_shift(p,{y=-2.8}))
|
||||
if (noded and noded.drawtype ~= 'airlike') then
|
||||
minetest.sound_play("ju52_touch", {
|
||||
--to_player = self.driver_name,
|
||||
object = self.object,
|
||||
max_hear_distance = 15,
|
||||
gain = 1.0,
|
||||
fade = 0.0,
|
||||
pitch = 1.0,
|
||||
}, true)
|
||||
end
|
||||
end
|
||||
|
||||
if collision then
|
||||
--self.object:set_velocity({x=0,y=0,z=0})
|
||||
local damage = impact / 2
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue