Compare commits

...

1 Commits

Author SHA1 Message Date
SmallJoker
792756c003 Use automatic_face_movement_max_rotation_per_sec for testing 2017-11-26 15:09:54 +01:00

View File

@ -34,7 +34,9 @@ local cart_entity = {
old_switch = 0, old_switch = 0,
sound_counter = 0, sound_counter = 0,
railtype = nil, railtype = nil,
attached_items = {} attached_items = {},
automatic_face_movement_dir = -90.0,
automatic_face_movement_max_rotation_per_sec = 360 * 4,
} }
-- Model and textures -- Model and textures
@ -341,6 +343,7 @@ function cart_entity:on_step(dtime)
-- Re-use "dir", localize self.old_dir -- Re-use "dir", localize self.old_dir
dir = self.old_dir dir = self.old_dir
if stop_wiggle then
local yaw = 0 local yaw = 0
if dir.x < 0 then if dir.x < 0 then
yaw = 0.5 yaw = 0.5
@ -350,6 +353,7 @@ function cart_entity:on_step(dtime)
yaw = 1 yaw = 1
end end
self.object:set_yaw(yaw * math.pi) self.object:set_yaw(yaw * math.pi)
end
local anim = {x=0, y=0} local anim = {x=0, y=0}
if dir.y == -1 then if dir.y == -1 then