diff options
author | cheapie <no-email-for-you@example.com> | 2024-04-26 19:34:06 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2024-04-26 19:34:06 -0500 |
commit | 9583fadc26afdde94a160acc6b3fc92c195ef05b (patch) | |
tree | 9aea17367edd33f80b0a03ccad26cd50eaf5bd1b | |
parent | b8551c435a40a3f1be957e6e0c326938553053b2 (diff) | |
download | celevator-9583fadc26afdde94a160acc6b3fc92c195ef05b.tar celevator-9583fadc26afdde94a160acc6b3fc92c195ef05b.tar.gz celevator-9583fadc26afdde94a160acc6b3fc92c195ef05b.tar.bz2 celevator-9583fadc26afdde94a160acc6b3fc92c195ef05b.tar.xz celevator-9583fadc26afdde94a160acc6b3fc92c195ef05b.zip |
Hopefully fix car door drifting past closed sometimes
-rw-r--r-- | doors.lua | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -444,8 +444,8 @@ function celevator.doors.carstep(dtime) celevator.doors.erefs[hash][i]:set_velocity(vector.multiply(data.opendir,vel/2*-0.66)) end if data.time >= math.pi then - for i=1,6,1 do - celevator.doors.erefs[hash][i]:set_velocity(vector.new(0,0,0)) + for _,ref in ipairs(celevator.doors.erefs[hash]) do + ref:set_velocity(vector.new(0,0,0)) end celevator.get_meta(data.positions[1]):set_string("doorstate","closed") cardoors_moving[hash] = nil |