mirror of
https://github.com/APercy/automobiles_pck
synced 2025-06-15 13:28:02 +02:00
added default option for motocycle player animation
This commit is contained in:
parent
2d0edd7658
commit
0d6faf9afd
@ -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
|
||||
|
@ -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',
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
})
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user