diff --git a/automobiles_lib/entities.lua b/automobiles_lib/entities.lua index aca219d..385755a 100644 --- a/automobiles_lib/entities.lua +++ b/automobiles_lib/entities.lua @@ -312,13 +312,6 @@ function automobiles_lib.on_activate(self, staticdata, dtime_s) local steering=minetest.add_entity(self.steering_axis:get_pos(), self._steering_ent) steering:set_attach(self.steering_axis,'',{x=0,y=0,z=0},{x=0,y=0,z=0}) self.steering = steering - else - --[[self.object:set_bone_override("drive_adjust", { - position = {self._drive_wheel_pos}, - rotation = {self._drive_wheel_angle} - })]]-- - - --self.object:set_bone_position("drive_adjust", self._drive_wheel_pos, {x=self._drive_wheel_angle, y=0, z=0}) end if self._rag_retracted_ent then diff --git a/automobiles_lib/init.lua b/automobiles_lib/init.lua index 9350d36..448546f 100755 --- a/automobiles_lib/init.lua +++ b/automobiles_lib/init.lua @@ -42,6 +42,13 @@ if load_noob_mode == true then automobiles_lib.extra_stepheight = 1 end +local motorcycle_anim_mode = minetest.settings:get_bool("motorcycle_anim_mode", true) +automobiles_lib.mot_anim_mode = true +if motorcycle_anim_mode == false then + automobiles_lib.mot_anim_mode = false +end + + --cars colors automobiles_lib.colors ={ black='#2b2b2b', diff --git a/automobiles_lib/settingtypes.txt b/automobiles_lib/settingtypes.txt index 8b2c55f..9f1b30a 100644 --- a/automobiles_lib/settingtypes.txt +++ b/automobiles_lib/settingtypes.txt @@ -4,3 +4,4 @@ # make cars collectable collect_automobiles (Collect vehicles to inventory) bool true noob_mode (make automobiles climb entire blocks) bool false +motorcycle_anim_mode (enable motorcycle pilot animations) bool true diff --git a/automobiles_motorcycle/motorcycle_entities.lua b/automobiles_motorcycle/motorcycle_entities.lua index 14dcd84..7f6a012 100755 --- a/automobiles_motorcycle/motorcycle_entities.lua +++ b/automobiles_motorcycle/motorcycle_entities.lua @@ -247,11 +247,9 @@ minetest.register_entity("automobiles_motorcycle:motorcycle", { --player:set_bone_position("Arm_Left", {x=3.0, y=5, z=-arm_range-armZ}, {x=240-(self._steering_angle/2), y=0, z=0}) --player:set_bone_position("Arm_Right", {x=-3.0, y=5, z=armZ}, {x=240+(self._steering_angle/2), y=0, z=0}) - if self.driver_mesh then - --self.driver_mesh:set_bone_position("Arm_Left", {x=3.0, y=5, z=-armZ-2}, {x=180+60-(self._steering_angle/2), y=0, z=0}) - --old self.driver_mesh:set_bone_override("Arm_Left", { position = {x=3.0, y=5, z=-armZ-2}, rotation = {x=60-(self._steering_angle/2), y=0, z=0}}) - --self.driver_mesh:set_bone_position("Arm_Right", {x=-3.0, y=5, z=armZ}, {x=180+60+(self._steering_angle/2), y=0, z=0}) - --old self.driver_mesh:set_bone_override("Arm_Right", { position = {x=-3.0, y=5, z=-armZ}, rotation = {x=60+(self._steering_angle/2), y=0, z=0} }) + if self.driver_mesh and automobiles_lib.mot_anim_mode then + self.driver_mesh:set_bone_position("Arm_Left", {x=3.0, y=5, z=-armZ-2}, {x=180+60-(self._steering_angle/2), y=0, z=0}) + self.driver_mesh:set_bone_position("Arm_Right", {x=-3.0, y=5, z=armZ}, {x=180+60+(self._steering_angle/2), y=0, z=0}) end end end diff --git a/automobiles_motorcycle/motorcycle_player.lua b/automobiles_motorcycle/motorcycle_player.lua index 65afbe3..807b2c9 100644 --- a/automobiles_motorcycle/motorcycle_player.lua +++ b/automobiles_motorcycle/motorcycle_player.lua @@ -62,9 +62,10 @@ function motorcycle.attach_driver_stand(self, player) position = {vec = {x=-1.0, y=0, z=0}, absolute = true}, rotation = {vec = {x=math.rad(-12), y=0, z=math.rad(-190)}, absolute = true} })]]-- - --self.driver_mesh:set_bone_position("Leg_Left", {x=1.1, y=0, z=0}, {x=12, y=0, z=10}) - --self.driver_mesh:set_bone_position("Leg_Right", {x=-1.1, y=0, z=0}, {x=12, y=0, z=-10}) - + if automobiles_lib.mot_anim_mode then + self.driver_mesh:set_bone_position("Leg_Left", {x=1.1, y=0, z=0}, {x=-12, y=0, z=190}) + self.driver_mesh:set_bone_position("Leg_Right", {x=-1.1, y=0, z=0}, {x=-12, y=0, z=-190}) + end self.driver_mesh:set_properties({ is_visible=true, }) @@ -147,8 +148,13 @@ function motorcycle.attach_pax_stand(self, player) --position the dummy arms and legs self.pax_mesh:set_properties(self.pax_properties) - --self.pax_mesh:set_bone_position("Leg_Left", {x=1.1, y=0, z=0}, {x=180+12, y=0, z=10}) - --self.pax_mesh:set_bone_position("Leg_Right", {x=-1.1, y=0, z=0}, {x=180+12, y=0, z=-10}) + if automobiles_lib.mot_anim_mode then + self.pax_mesh:set_bone_position("Leg_Left", {x=1.1, y=0, z=0}, {x=180+12, y=0, z=10}) + self.pax_mesh:set_bone_position("Leg_Right", {x=-1.1, y=0, z=0}, {x=180+12, y=0, z=-10}) + + self.pax_mesh:set_bone_position("Arm_Left", {x=3.0, y=5, z=0}, {x=180+45, y=0, z=0}) + self.pax_mesh:set_bone_position("Arm_Right", {x=-3.0, y=5, z=0}, {x=180+45, y=0, z=0}) + end self.pax_mesh:set_properties({ is_visible=true, }) diff --git a/automobiles_vespa/vespa_entities.lua b/automobiles_vespa/vespa_entities.lua index c328219..6687243 100755 --- a/automobiles_vespa/vespa_entities.lua +++ b/automobiles_vespa/vespa_entities.lua @@ -240,9 +240,9 @@ minetest.register_entity("automobiles_vespa:vespa", { --player:set_bone_position("Arm_Left", {x=3.0, y=5, z=-arm_range-armZ}, {x=240-(self._steering_angle/2), y=0, z=0}) --player:set_bone_position("Arm_Right", {x=-3.0, y=5, z=armZ}, {x=240+(self._steering_angle/2), y=0, z=0}) - if self.driver_mesh then - --self.driver_mesh:set_bone_position("Arm_Left", {x=3.0, y=5, z=-armZ-0.5}, {x=180+76-(self._steering_angle/2), y=0, z=0}) - --self.driver_mesh:set_bone_position("Arm_Right", {x=-3.0, y=5, z=armZ+1.5}, {x=180+76+(self._steering_angle/2), y=0, z=0}) + if self.driver_mesh and automobiles_lib.mot_anim_mode then + self.driver_mesh:set_bone_position("Arm_Left", {x=3.0, y=5, z=-armZ-0.5}, {x=180+76-(self._steering_angle/2), y=0, z=0}) + self.driver_mesh:set_bone_position("Arm_Right", {x=-3.0, y=5, z=armZ+1.5}, {x=180+76+(self._steering_angle/2), y=0, z=0}) end end diff --git a/automobiles_vespa/vespa_player.lua b/automobiles_vespa/vespa_player.lua index a3dcc96..15b0598 100644 --- a/automobiles_vespa/vespa_player.lua +++ b/automobiles_vespa/vespa_player.lua @@ -54,8 +54,10 @@ function vespa.attach_driver_stand(self, player) --position the dummy arms and legs self.driver_mesh:set_properties(self.driver_properties) - --self.driver_mesh:set_bone_position("Leg_Left", {x=1.1, y=1, z=0}, {x=180+12, y=0, z=7}) - --self.driver_mesh:set_bone_position("Leg_Right", {x=-1.1, y=1, z=0}, {x=180+12, y=0, z=-7}) + if automobiles_lib.mot_anim_mode then + self.driver_mesh:set_bone_position("Leg_Left", {x=1.1, y=1, z=0}, {x=180+12, y=0, z=7}) + self.driver_mesh:set_bone_position("Leg_Right", {x=-1.1, y=1, z=0}, {x=180+12, y=0, z=-7}) + end self.driver_mesh:set_properties({ is_visible=true, }) @@ -138,12 +140,13 @@ function vespa.attach_pax_stand(self, player) --position the dummy arms and legs self.pax_mesh:set_properties(self.pax_properties) - --self.pax_mesh:set_bone_position("Leg_Left", {x=1.1, y=0, z=0}, {x=180+12, y=0, z=15}) - --self.pax_mesh:set_bone_position("Leg_Right", {x=-1.1, y=0, z=0}, {x=180+12, y=0, z=-15}) - - --self.pax_mesh:set_bone_position("Arm_Left", {x=3.0, y=5, z=0}, {x=180+45, y=0, z=0}) - --self.pax_mesh:set_bone_position("Arm_Right", {x=-3.0, y=5, z=0}, {x=180+45, y=0, z=0}) + if automobiles_lib.mot_anim_mode then + self.pax_mesh:set_bone_position("Leg_Left", {x=1.1, y=0, z=0}, {x=180+12, y=0, z=15}) + self.pax_mesh:set_bone_position("Leg_Right", {x=-1.1, y=0, z=0}, {x=180+12, y=0, z=-15}) + self.pax_mesh:set_bone_position("Arm_Left", {x=3.0, y=5, z=0}, {x=180+45, y=0, z=0}) + self.pax_mesh:set_bone_position("Arm_Right", {x=-3.0, y=5, z=0}, {x=180+45, y=0, z=0}) + end self.pax_mesh:set_properties({ is_visible=true, })