fixed bones for version 5.11

This commit is contained in:
Alexsandro Percy 2025-02-15 16:49:01 -03:00
parent 2ecb7c6280
commit 42221e6b24
5 changed files with 28 additions and 23 deletions

View File

@ -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

View File

@ -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,

View File

@ -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,
})

View File

@ -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,

View File

@ -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,