diff options
author | stujones11 <stujones111@gmail.com> | 2016-01-15 22:07:31 +0000 |
---|---|---|
committer | stujones11 <stujones111@gmail.com> | 2016-01-15 22:07:31 +0000 |
commit | aee5c31362ca329ab71998d8c43588dba5113e04 (patch) | |
tree | 5dd2149abcf1792f3749d45d1857f4559661d0e2 /railcart/init.lua | |
parent | 25aa9b3e6e0f37486583286eba3ee48ff7185db6 (diff) |
Increase push and maximum velocity
Diffstat (limited to 'railcart/init.lua')
-rw-r--r-- | railcart/init.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/railcart/init.lua b/railcart/init.lua index 417b429..c18bc82 100644 --- a/railcart/init.lua +++ b/railcart/init.lua @@ -79,10 +79,11 @@ minetest.register_entity("railcart:cart_entity", { if self.cart and direction then local pos = vector.round(self.object:getpos()) local dir = vector.round(vector.normalize(direction)) + local speed = railcart:velocity_to_speed(self.cart.vel) self.timer = 0 self.cart.target = nil self.cart.prev = pos - self.cart.vel = vector.multiply(dir, 4) + self.cart.vel = vector.multiply(dir, RAILCART_SPEED_PUSH) self.cart.accel = railtrack:get_acceleration(pos) self.object:setvelocity(self.cart.vel) end |