sound improvement

This commit is contained in:
Alexsandro Percy 2021-04-20 17:29:52 -03:00
parent fd17bb2abb
commit 1d01af23d6
4 changed files with 4 additions and 4 deletions

View File

@ -43,7 +43,7 @@ function hidroplane.control(self, dtime, hull_direction, longit_speed, longit_dr
elseif self._engine_running == false and self._energy > 0 then
self._engine_running = true
-- sound and animation
self.sound_handle = minetest.sound_play({name = "engine"},
self.sound_handle = minetest.sound_play({name = "hidroplane_engine"},
{object = self.object, gain = 2.0, pitch = 0.5 + ((self._power_lever/100)/2),max_hear_distance = 32, loop = true,})
self.engine:set_animation_frame_speed(60)
end
@ -67,7 +67,7 @@ function hidroplane.control(self, dtime, hull_direction, longit_speed, longit_dr
else
--sound
minetest.sound_stop(self.sound_handle)
self.sound_handle = minetest.sound_play({name = "engine"},
self.sound_handle = minetest.sound_play({name = "hidroplane_engine"},
{object = self.object, gain = 2.0, pitch = 0.5 + ((self._power_lever/100)/2),max_hear_distance = 32, loop = true,})
end
end
@ -91,7 +91,7 @@ function hidroplane.control(self, dtime, hull_direction, longit_speed, longit_dr
else
--sound
minetest.sound_stop(self.sound_handle)
self.sound_handle = minetest.sound_play({name = "engine"},
self.sound_handle = minetest.sound_play({name = "hidroplane_engine"},
{object = self.object, gain = 2.0, pitch = 0.5 + ((self._power_lever/100)/2),max_hear_distance = 32, loop = true,})
end
end

View File

@ -340,7 +340,7 @@ function hidroplane.testImpact(self, velocity, position)
local curr_pos = self.object:get_pos()
if self.driver_name then
minetest.sound_play("collision", {
minetest.sound_play("hidroplane_collision", {
to_player = self.driver_name,
--pos = curr_pos,
--max_hear_distance = 5,