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