mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-05-03 04:29:22 +02:00
Updated walking
This commit is contained in:
parent
be8704ee92
commit
9b9ade0bc9
@ -13,6 +13,7 @@ lastTurn = 0
|
||||
lastTurnDirection = 0
|
||||
lastStop = 0
|
||||
lastManualWalk = 0
|
||||
autoFinishNextServerWalk = 0
|
||||
turnKeys = {}
|
||||
|
||||
function init()
|
||||
@ -227,11 +228,12 @@ function canChangeFloorUp(pos)
|
||||
end
|
||||
|
||||
function onPositionChange(player, newPos, oldPos)
|
||||
|
||||
end
|
||||
|
||||
function onWalk(player, newPos, oldPos)
|
||||
|
||||
if autoFinishNextServerWalk + 200 > g_clock.millis() then
|
||||
player:finishServerWalking()
|
||||
end
|
||||
end
|
||||
|
||||
function onTeleport(player, newPos, oldPos)
|
||||
@ -378,6 +380,11 @@ function walk(dir, ticks)
|
||||
end
|
||||
end
|
||||
|
||||
if player:isServerWalking() and not dash then
|
||||
g_game.stop()
|
||||
player:finishServerWalking()
|
||||
autoFinishNextServerWalk = g_clock.millis() + 200
|
||||
end
|
||||
g_game.walk(dir, preWalked)
|
||||
|
||||
if not firstStep and lastWalkDir ~= dir then
|
||||
|
BIN
otclient_dx.exe
BIN
otclient_dx.exe
Binary file not shown.
BIN
otclient_gl.exe
BIN
otclient_gl.exe
Binary file not shown.
BIN
otclient_linux
BIN
otclient_linux
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user