1
0
mirror of https://github.com/SmallJoker/boost_cart.git synced 2024-12-26 10:50:18 +01:00

less gravity, more speed up/slow down

This commit is contained in:
SmallJoker 2014-08-07 13:40:10 +02:00
parent c106499bd5
commit 70f07f4158

View File

@ -130,8 +130,6 @@ function boost_cart.cart:on_step(dtime)
dir = false dir = false
pos = vector.new(expected_pos) pos = vector.new(expected_pos)
self.punch = true self.punch = true
--else
-- pos = vector.add(self.old_pos, self.old_dir)
end end
--minetest.log("action", "Cart moving too fast at "..minetest.pos_to_string(expected_pos)) --minetest.log("action", "Cart moving too fast at "..minetest.pos_to_string(expected_pos))
break break
@ -184,7 +182,7 @@ function boost_cart.cart:on_step(dtime)
end end
-- Slow down or speed up.. -- Slow down or speed up..
local acc = dir.y * -2 local acc = dir.y * -1.8
local speed_mod = tonumber(minetest.get_meta(pos):get_string("cart_acceleration")) local speed_mod = tonumber(minetest.get_meta(pos):get_string("cart_acceleration"))
if speed_mod and speed_mod ~= 0 then if speed_mod and speed_mod ~= 0 then
@ -196,7 +194,7 @@ function boost_cart.cart:on_step(dtime)
end end
end end
end end
acc = acc + (speed_mod * 6) acc = acc + (speed_mod * 7)
else else
acc = acc - 0.4 acc = acc - 0.4
end end