mob
proc
Join_Round()
if(RoundStarted==FALSE)
players.Add(src)
lobbylist.Remove(src)
ingame+=1
world << "[src] has joined the round!"
for(var/mob/M in players)
world << M
M.RemoveHUD(/round/join_round)
M.movestop=1
Begin_Round()
else
return
Begin_Round()
var/area/a=pick(spawnpoints)
src.loc=a
round = "Japan"
src.chat_system = "Alive"
Problem description: Players who join the round while not moving are instantly brought to the new map, no issues what-so-ever, but players who click the Join button while moving don't teleport and end up staying in the lobby.
It's weird.
EDIT: Here's the movement code if that helps.
mob
var
movedelay = 0.01
movestop = 0
Move()
if(dir == SOUTHWEST||dir == SOUTHEAST||dir == NORTHWEST||dir == NORTHEAST||movestop)
return 0
else
movestop = 1
spawn(movedelay)
movestop = 0
..()