diff --git a/init.lua b/init.lua index 93b4fe7..8fd36fb 100644 --- a/init.lua +++ b/init.lua @@ -423,6 +423,7 @@ end function airutils.sit(player) --set_animation(frame_range, frame_speed, frame_blend, frame_loop) player:set_animation({x = 81, y = 160},30, 0, true) + if emote then emote.start(player:get_player_name(), "sit") end end diff --git a/lib_planes/entities.lua b/lib_planes/entities.lua index b5bd303..1858bd7 100644 --- a/lib_planes/entities.lua +++ b/lib_planes/entities.lua @@ -654,9 +654,8 @@ function airutils.on_punch(self, puncher, ttime, toolcaps, dir, damage) -- deal with painting or destroying if itmstck then if airutils.set_param_paint(self, puncher, itmstck, 1) == false then - if not self.driver and toolcaps and toolcaps.damage_groups - and toolcaps.groupcaps and toolcaps.groupcaps.choppy and item_name ~= airutils.fuel then + and toolcaps.groupcaps and (toolcaps.groupcaps.choppy or toolcaps.groupcaps.axey_dig) and item_name ~= airutils.fuel then --airutils.hurt(self,toolcaps.damage_groups.fleshy - 1) --airutils.make_sound(self,'hit') damage_vehicle(self, toolcaps, ttime, damage) @@ -729,6 +728,7 @@ function airutils.on_rightclick(self, clicker) else self._custom_pilot_formspec(name) end + airutils.sit(clicker) end else self.driver_name = nil --error, so clean it diff --git a/lib_planes/utilities.lua b/lib_planes/utilities.lua index e716988..bb9b735 100644 --- a/lib_planes/utilities.lua +++ b/lib_planes/utilities.lua @@ -60,6 +60,8 @@ function airutils.attach(self, player, instructor_mode) player_api.player_attached[name] = true player_api.set_animation(player, "sit") elseif airutils.is_mcl then + mcl_player.player_attached[name] = true + mcl_player.player_set_animation(player, "sit" , 30) airutils.sit(player) end @@ -128,7 +130,8 @@ local function attach_copilot(self, name, player, eye_y) player_api.player_attached[name] = true player_api.set_animation(player, "sit") elseif airutils.is_mcl then - mcl_player.player_attached[name] = true + mcl_player.player_attached[name] = true + mcl_player.player_set_animation(player, "sit" , 30) airutils.sit(player) end -- make the driver sit @@ -190,7 +193,8 @@ function airutils.attach_pax(self, player, is_copilot) player_api.player_attached[name] = true player_api.set_animation(player, "sit") elseif airutils.is_mcl then - mcl_player.player_attached[name] = true + mcl_player.player_attached[name] = true + mcl_player.player_set_animation(player, "sit" , 30) airutils.sit(player) end @@ -918,7 +922,8 @@ local function do_attach(self, player, slot) player_api.player_attached[name] = true player_api.set_animation(player, "sit") elseif airutils.is_mcl then - mcl_player.player_attached[name] = true + mcl_player.player_attached[name] = true + mcl_player.player_set_animation(player, "sit" , 30) airutils.sit(player) end