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 | |
| parent | 25aa9b3e6e0f37486583286eba3ee48ff7185db6 (diff) | |
Increase push and maximum velocity
Diffstat (limited to 'railcart')
| -rw-r--r-- | railcart/init.lua | 3 | ||||
| -rw-r--r-- | railcart/railcart.lua | 3 | 
2 files changed, 4 insertions, 2 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 diff --git a/railcart/railcart.lua b/railcart/railcart.lua index df6d635..bdd9a05 100644 --- a/railcart/railcart.lua +++ b/railcart/railcart.lua @@ -3,8 +3,9 @@ RAILCART_OBJECT_UPDATE_TIME = 5  RAILCART_OBJECT_SAVE_TIME = 10  RAILCART_RELOAD_DISTANCE = 32  RAILCART_SNAP_DISTANCE = 0.5 +RAILCART_SPEED_PUSH = 5  RAILCART_SPEED_MIN = 0.1 -RAILCART_SPEED_MAX = 10 +RAILCART_SPEED_MAX = 20  railcart = {  	timer = 0, | 
