aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeha <shacknetisp@mail.com>2017-03-08 12:32:23 -0500
committerBeha <shacknetisp@mail.com>2017-03-08 12:32:23 -0500
commitd2cf183c5256e7b4840d1b0c8f2f133cb85b7b19 (patch)
tree5c85eb046562210da5a3b1d2d40152da34dca447
parentd045312ccd85cb6ef41170ff791199f5da52cbb2 (diff)
downloadelevator-d2cf183c5256e7b4840d1b0c8f2f133cb85b7b19.tar.gz
elevator-d2cf183c5256e7b4840d1b0c8f2f133cb85b7b19.tar.bz2
elevator-d2cf183c5256e7b4840d1b0c8f2f133cb85b7b19.zip
Normal speed and acceleration.
-rw-r--r--init.lua9
1 files changed, 1 insertions, 8 deletions
diff --git a/init.lua b/init.lua
index 839e61a..d93739c 100644
--- a/init.lua
+++ b/init.lua
@@ -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,
}