From e19d8701ce1725ecc8e2a1a0bb3fea825c06662a Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sat, 28 Oct 2017 17:22:47 +0200 Subject: [PATCH] Reduce eye position, rotation update frequency --- cart_entity.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cart_entity.lua b/cart_entity.lua index 8343638..69f45fb 100644 --- a/cart_entity.lua +++ b/cart_entity.lua @@ -307,6 +307,7 @@ function cart_entity:on_step(dtime) self.object:set_acceleration(new_acc) self.old_pos = vector.round(pos) + local old_y_dir = self.old_dir.y if not vector.equals(dir, {x=0, y=0, z=0}) and not stop_wiggle then self.old_dir = dir end @@ -351,7 +352,7 @@ function cart_entity:on_step(dtime) anim = {x=2, y=2} end self.object:set_animation(anim, 1, 0) - if player then + if player and dir.y ~= old_y_dir then local feet = {x=0, y=0, z=0} local eye = {x=0, y=-4, z=0} feet.y = boost_cart.old_player_model and 6 or -4.2