1
2
3
4
5
6
7
8
9
10
addhook("serveraction","move1tile")
function move1tile(id,b)
	parse("setpos "..id.." "..player(id,"x")+math.cos(unitangle(player(id,"rot")))*32 .." "..player(id,"y")+math.sin(unitangle(player(id,"rot")))*32)
end
function unitangle(rot)
if rot<-90 then rot=rot+360 end
local angle=math.rad(math.abs(rot+90))-math.pi
return angle
end