fix sound issues
parent
e054616062
commit
8af820a654
|
@ -208,7 +208,7 @@ minetest.register_entity("pa28:pa28", {
|
|||
|
||||
on_deactivate = function(self)
|
||||
airutils.save_inventory(self)
|
||||
minetest.sound_stop(self.sound_handle)
|
||||
if(self.sound_handle) then minetest.sound_stop(self.sound_handle) end
|
||||
end,
|
||||
|
||||
on_activate = function(self, staticdata, dtime_s)
|
||||
|
@ -287,7 +287,7 @@ minetest.register_entity("pa28:pa28", {
|
|||
else
|
||||
self.inv = inv
|
||||
end
|
||||
if self._engine_running then pa28.engineSoundPlay(self) end
|
||||
if self._engine_running == true then pa28.engineSoundPlay(self) end
|
||||
end,
|
||||
|
||||
--on_step = airutils.stepfunc,
|
||||
|
|
|
@ -46,12 +46,12 @@ function pa28.attach(self, player, instructor_mode)
|
|||
|
||||
player:set_eye_offset({x = 0, y = eye_y, z = 2}, {x = 0, y = 1, z = -30})
|
||||
player_api.player_attached[name] = true
|
||||
player_api.set_animation(player, "sit")
|
||||
--player:set_physics_override({gravity = 0})
|
||||
-- make the driver sit
|
||||
minetest.after(1, function()
|
||||
if player then
|
||||
--minetest.chat_send_all("okay")
|
||||
player_api.set_animation(player, "sit")
|
||||
airutils.sit(player)
|
||||
--apply_physics_override(player, {speed=0,gravity=0,jump=0})
|
||||
end
|
||||
|
@ -92,11 +92,11 @@ function pa28.attach_pax(self, player, is_copilot)
|
|||
player:set_attach(self.co_pilot_seat_base, "", {x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0})
|
||||
player:set_eye_offset({x = 0, y = eye_y, z = 2}, {x = 0, y = 3, z = -30})
|
||||
player_api.player_attached[name] = true
|
||||
player_api.set_animation(player, "sit")
|
||||
-- make the driver sit
|
||||
minetest.after(0.3, function()
|
||||
player = minetest.get_player_by_name(name)
|
||||
if player then
|
||||
player_api.set_animation(player, "sit")
|
||||
airutils.sit(player)
|
||||
--apply_physics_override(player, {speed=0,gravity=0,jump=0})
|
||||
end
|
||||
|
@ -124,11 +124,11 @@ function pa28.attach_pax(self, player, is_copilot)
|
|||
player:set_eye_offset({x = 0, y = eye_y, z = 0}, {x = 0, y = 3, z = -30})
|
||||
end
|
||||
player_api.player_attached[name] = true
|
||||
player_api.set_animation(player, "sit")
|
||||
-- make the driver sit
|
||||
minetest.after(0.3, function()
|
||||
player = minetest.get_player_by_name(name)
|
||||
if player then
|
||||
player_api.set_animation(player, "sit")
|
||||
airutils.sit(player)
|
||||
--apply_physics_override(player, {speed=0,gravity=0,jump=0})
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue