Fix for 5.1+.

5.1+ is now setting the forward control as well when
auto-forwarding.  The button is optional now, to support
both 5.0 and 5.1.

Note that this means auto-trekking happens when moving
forward manually too now, but since it seems unlikely that
most players would be keeping the look direction constant
when not intending to auto-travel, this should be fine...?
This commit is contained in:
Aaron Suen 2019-10-16 23:25:52 -04:00
parent 516090bb91
commit bd7794dfb5

View File

@ -75,6 +75,7 @@ local function autofwdcheck(player)
end
local ctl = player:get_player_control_bits()
if ctl / 2 ~= math_floor(ctl / 2) then ctl = ctl - 1 end
if ctl ~= 0 and ctl ~= 16 then return nope() end
local dir = player:get_look_vertical()