diff options
author | Beha <shacknetisp@mail.com> | 2017-03-08 12:32:23 -0500 |
---|---|---|
committer | Beha <shacknetisp@mail.com> | 2017-03-08 12:32:23 -0500 |
commit | d2cf183c5256e7b4840d1b0c8f2f133cb85b7b19 (patch) | |
tree | 5c85eb046562210da5a3b1d2d40152da34dca447 | |
parent | d045312ccd85cb6ef41170ff791199f5da52cbb2 (diff) |
Normal speed and acceleration.
-rw-r--r-- | init.lua | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -1,5 +1,5 @@ local SPEED = 10 -local ACCEL = 1 +local ACCEL = 0.1 local VERSION = 6 local elevator = { @@ -548,13 +548,6 @@ local box_entity = { end end self.lastpos = pos - if vector.distance(pos, self.target) < 32 and self.object:getvelocity().y > SPEED/2 then - self.object:setacceleration({x=0, y=((SPEED)*self.vmult*-1), z=0}) - elseif self.object:getvelocity().y > SPEED and vector.distance(pos, self.target) < math.min(100, vector.distance(pos, self.start)) then - self.object:setacceleration({x=0, y=((SPEED/10)*self.vmult*-1), z=0}) - elseif self.object:getvelocity().y <= SPEED/1.5 then - self.object:setacceleration({x=0, y=((SPEED/10)*self.vmult), z=0}) - end end, } |