// auto-transcompiled — see *.dnd.json for canonical truth
//Depth
depth = (y+43)*-1;

if(sprite_index != TeleIn && sprite_index != TeleOut)
{
if(sprite_exists(global.p_spr[pid,0]))
{
sprite_index = global.p_spr[pid,0];
}
else
{
sprite_index = NOSPRITE;
}
x = global.p_x[pid];
y = global.p_y[pid];
if(image_speed != 0.4)
{
image_speed = 0.4;
}
}
else if(x == 0 || y == 0)
{
if(sprite_exists(global.p_spr[pid,0]))
{
sprite_index = global.p_spr[pid,0];
}
else
{
sprite_index = NOSPRITE;
}
x = global.p_x[pid];
y = global.p_y[pid];
}


if((!global.p_online[pid] || global.p_room[pid] != room) && sprite_index != TeleOut)
{
image_speed = 1
sprite_index = TeleOut;
}
