diff --git a/automobiles_lib/entities.lua b/automobiles_lib/entities.lua index 1f8f3af..2514560 100644 --- a/automobiles_lib/entities.lua +++ b/automobiles_lib/entities.lua @@ -314,11 +314,11 @@ function automobiles_lib.on_activate(self, staticdata, dtime_s) self.steering = steering else self.object:set_bone_override("drive_adjust", { - position = {self._drive_wheel_pos, absolute = false}, - rotation = {self._drive_wheel_angle, absolute = false} + 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}) + --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_motorcycle/motorcycle_entities.lua b/automobiles_motorcycle/motorcycle_entities.lua index 2669384..667cab2 100755 --- a/automobiles_motorcycle/motorcycle_entities.lua +++ b/automobiles_motorcycle/motorcycle_entities.lua @@ -235,7 +235,7 @@ minetest.register_entity("automobiles_motorcycle:motorcycle", { local player_attach = player:get_attach() if player_attach then if self.driver_seat then - if player_attach == self.driver_seat then is_attached = true end + if player_attach == self.driver_seat or player_attach == self.object then is_attached = true end end end @@ -249,17 +249,19 @@ 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=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=60+(self._steering_angle/2), y=0, z=0}) + 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_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}) + --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} }) end end end if is_attached == false then self._stopped_roll = math.rad(-12) - self.object:set_bone_position("descanso", {x=0, y=-2.55, z=5.9}, {x=-90, y=0, z=0}) + self.object:set_bone_position("descanso", {x=0, y=-2.55, z=5.9}, {x=180-90, y=180, z=0}) else - self.object:set_bone_position("descanso", {x=0, y=-2.55, z=5.9}, {x=0, y=0, z=0}) + self.object:set_bone_position("descanso", {x=0, y=-2.55, z=5.9}, {x=0, y=180, z=0}) end end, diff --git a/automobiles_motorcycle/motorcycle_player.lua b/automobiles_motorcycle/motorcycle_player.lua index 4a63204..6e54b76 100644 --- a/automobiles_motorcycle/motorcycle_player.lua +++ b/automobiles_motorcycle/motorcycle_player.lua @@ -54,8 +54,9 @@ function motorcycle.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=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}) + self.driver_mesh:set_bone_position("Leg_Left", {x=1.1, y=0, z=0}, {x=180+12, y=0, z=10}) + self.driver_mesh:set_bone_position("Leg_Right", {x=-1.1, y=0, z=0}, {x=180+12, y=0, z=-10}) + self.driver_mesh:set_properties({ is_visible=true, }) @@ -143,8 +144,8 @@ 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=12, y=0, z=10}) - self.pax_mesh:set_bone_position("Leg_Right", {x=-1.1, y=0, z=0}, {x=12, y=0, z=-10}) + 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_properties({ is_visible=true, }) diff --git a/automobiles_vespa/vespa_entities.lua b/automobiles_vespa/vespa_entities.lua index 47ea8b1..c734592 100755 --- a/automobiles_vespa/vespa_entities.lua +++ b/automobiles_vespa/vespa_entities.lua @@ -228,7 +228,7 @@ minetest.register_entity("automobiles_vespa:vespa", { local player_attach = player:get_attach() if player_attach then if self.driver_seat then - if player_attach == self.driver_seat then is_attached = true end + if player_attach == self.driver_seat or player_attach == self.object then is_attached = true end end end @@ -242,17 +242,19 @@ 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=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=76+(self._steering_angle/2), y=0, z=0}) + 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 end if is_attached == false then - self.object:set_bone_position("descanso", {x=0, y=-0.4, z=6.2}, {x=-90, y=0, z=0}) + --core.chat_send_all("false") + self.object:set_bone_position("descanso", {x=0, y=-0.4, z=6.2}, {x=90, y=0, z=0}) else - self.object:set_bone_position("descanso", {x=0, y=-0.4, z=6.2}, {x=0, y=0, z=0}) + --core.chat_send_all("true") + self.object:set_bone_position("descanso", {x=0, y=-0.4, z=6.2}, {x=180, y=0, z=0}) end end, diff --git a/automobiles_vespa/vespa_player.lua b/automobiles_vespa/vespa_player.lua index b62af2b..6b4e8cc 100644 --- a/automobiles_vespa/vespa_player.lua +++ b/automobiles_vespa/vespa_player.lua @@ -54,8 +54,8 @@ 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=12, y=0, z=7}) - self.driver_mesh:set_bone_position("Leg_Right", {x=-1.1, y=1, z=0}, {x=12, y=0, z=-7}) + 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}) self.driver_mesh:set_properties({ is_visible=true, }) @@ -143,11 +143,11 @@ 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=12, y=0, z=15}) - self.pax_mesh:set_bone_position("Leg_Right", {x=-1.1, y=0, z=0}, {x=12, y=0, z=-15}) + 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=45, y=0, z=0}) - self.pax_mesh:set_bone_position("Arm_Right", {x=-3.0, y=5, z=0}, {x=45, y=0, z=0}) + 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}) self.pax_mesh:set_properties({ is_visible=true,