parent
cb40d114ab
commit
9c6d72a023
@ -36,10 +36,10 @@ public:
|
|||||||
|
|
||||||
// The map center is fixed at the central point of the 8x8 block of chunks you are standing in when you right-click it.
|
// The map center is fixed at the central point of the 8x8 block of chunks you are standing in when you right-click it.
|
||||||
|
|
||||||
const int RegionWidth = cChunkDef::Width * 8 * pow(2.0, (double) DEFAULT_SCALE);
|
const int RegionWidth = cChunkDef::Width * 8;
|
||||||
|
|
||||||
int CenterX = floor(a_Player->GetPosX() / (float) RegionWidth) * RegionWidth;
|
int CenterX = (int)(floor(a_Player->GetPosX() / (float) RegionWidth) * RegionWidth);
|
||||||
int CenterZ = floor(a_Player->GetPosZ() / (float) RegionWidth) * RegionWidth;
|
int CenterZ = (int)(floor(a_Player->GetPosZ() / (float) RegionWidth) * RegionWidth);
|
||||||
|
|
||||||
cMap * NewMap = a_World->GetMapManager().CreateMap(CenterX, CenterZ, DEFAULT_SCALE);
|
cMap * NewMap = a_World->GetMapManager().CreateMap(CenterX, CenterZ, DEFAULT_SCALE);
|
||||||
|
|
||||||
|
@ -357,6 +357,8 @@ void cMap::AddPlayer(cPlayer * a_Player, Int64 a_WorldAge)
|
|||||||
MapClient.m_LastUpdate = a_WorldAge;
|
MapClient.m_LastUpdate = a_WorldAge;
|
||||||
MapClient.m_SendInfo = true;
|
MapClient.m_SendInfo = true;
|
||||||
MapClient.m_Handle = Handle;
|
MapClient.m_Handle = Handle;
|
||||||
|
MapClient.m_DataUpdate = 0;
|
||||||
|
MapClient.m_NextDecoratorUpdate = 0;
|
||||||
|
|
||||||
m_Clients.push_back(MapClient);
|
m_Clients.push_back(MapClient);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user