...
BYTE attr = MapC[mapnumber].GetAttr(x, y);
if ( (attr&4) == 4 || (attr&8) == 8 )
{
BYTE attr2 = MapC[mapnumber].GetAttr(x+2, y);
BYTE attr3 = MapC[mapnumber].GetAttr(x, y+2);
BYTE attr4 = MapC[mapnumber].GetAttr(x-2, y);
BYTE attr5 = MapC[mapnumber].GetAttr(x, y-2);
if ( attr2 > 1 && attr3 > 1 && attr4 > 1 && attr5 > 1 )
{
g_Log.Add("[ CHECK POSITION ] DbgName[%d] [%s][%s] Map[%d]-(%d,%d) Invalid location causes to force to move",iDbgName,lpObj->AccountID, lpObj->Name, lpObj->MapNumber, lpObj->X, lpObj->Y);
PMSG_TELEPORT pMsg;
if (IT_MAP_RANGE(lpObj->MapNumber))
{
if (g_IT_Event.GetIllusionTempleState(lpObj->MapNumber) == 2)
{
BYTE btTeam = g_IT_Event.GetUserTeam(lpObj->MapNumber, lpObj->m_Index);
if (btTeam == 0xFF)
{
pMsg.MoveNumber = 17;
}
else if (btTeam == 1)
{
pMsg.MoveNumber = lpObj->MapNumber + 109;
}
else if (btTeam == 0)
{
pMsg.MoveNumber = lpObj->MapNumber + 103;
}
else
{
pMsg.MoveNumber = 17;
}
}
else
{
pMsg.MoveNumber = 17;
}
gObjMoveGate(lpObj->m_Index, pMsg.MoveNumber);
return TRUE;
}
else if (lpObj->MapNumber == MAP_INDEX_DEVILSQUARE_FINAL && g_DevilSquareFinal.m_btDSFCurState == 2)
{
if (g_DevilSquareFinal.GetUserTeam(lpObj->m_Index) == -1)
{
pMsg.MoveNumber = 17;
}
else
{
pMsg.MoveNumber = 474;
}
gObjMoveGate(lpObj->m_Index, pMsg.MoveNumber);
return TRUE;
}
else
{
gObjMoveGate(lpObj->m_Index, 17);
return TRUE;
}
}
}
return TRUE;
gObjMoveGate(lpObj->m_Index, pMsg.MoveNumber); [COLOR=#008000]// this is move my to lorencia ))[/COLOR]
return TRUE;
The problem can actually be from the terrain file. You are using the same terrain file in the server and client? Both have to be the same, otherwise the server can't calculate the "geodata" of the map. By bad position or missing tiles in Terrain file, the server side calculation can trigger the "Safe Teleporting" mechanism just to prevent players not getting stuck or abuse such locations. That's why you are getting teleported.
In the client/Data folder, search for the World folder of specific map and copy and replace the .att file from the server. (Terrain7.att I think is for Arena, but not sure).
if ((attr & 4) == 4 || (attr & 8) == 8)
{
BYTE attr2 = MapC[mapnumber].GetAttr(x + 2, y);
BYTE attr3 = MapC[mapnumber].GetAttr(x, y + 2);
BYTE attr4 = MapC[mapnumber].GetAttr(x - 2, y);
BYTE attr5 = MapC[mapnumber].GetAttr(x, y - 2);
if (lpObj->MapNumber == 6) { //My Crutch
return FALSE;
}
Yes, you can do that bypass in the source, but not sure if it's gonna have consequences.
Try testing the map with 2-3 characters at once.
Yes, you can do that bypass in the source, but not sure if it's gonna have consequences.
Try testing the map with 2-3 characters at once.
i am not sure i understand right but if in your files in arena map you get randomly teleported to other maps it should usually something be in gate.txt / gate file about arena coords line that u must remove, but we need more screenshots to see where exactly u get the issue or a simple video. Other than that u get any error in gameserver?
g_Log.Add("[ CHECK ATTR2,3,4,5] Attr2:%d - Attr3:%d - Attr4:%d - Attr5:%d", attr2, attr3, attr4, attr5);[COLOR=#666666]
[/COLOR]