added tire sound

master
Alexsandro Percy 2021-12-06 18:01:53 -03:00
parent 31a19923b3
commit a5ef3b5b8b
2 changed files with 14 additions and 0 deletions

View File

@ -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

BIN
sounds/ju52_touch.ogg Normal file

Binary file not shown.