added support for animation start change (just for fuselage)

This commit is contained in:
Alexsandro Percy 2023-07-08 13:08:34 -03:00
parent d3b677b8a5
commit 8bf6bb87aa
2 changed files with 8 additions and 1 deletions

View file

@ -70,7 +70,14 @@ function airutils.on_activate(self, staticdata, dtime_s)
self.object:set_armor_groups({immortal=1})
self.object:set_animation({x = 1, y = self._anim_frames}, 0, 0, true)
local start_frame = 1
local end_frame = self._anim_frames
if self._anim_start_frame then
start_frame = self._anim_start_frame
end_frame = self._anim_start_frame + self._anim_frames
end
self.object:set_animation({x = start_frame, y = end_frame}, 0, 0, true)
if self.wheels then
self.wheels:set_animation({x = 1, y = self._anim_frames}, 0, 0, true)
end

BIN
sounds/airutils_engine.ogg Normal file

Binary file not shown.