mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-03 19:52:26 +00:00
Fix for 64-bit Zone MMF compiles
This commit is contained in:
parent
3a4b341ad6
commit
6b3078d0f7
@ -3,6 +3,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@ -1048,7 +1049,7 @@ MyRaycastMesh::MyRaycastMesh(std::vector<char>& rm_buffer)
|
|||||||
mNodes = new NodeAABB[mMaxNodeCount];
|
mNodes = new NodeAABB[mMaxNodeCount];
|
||||||
mRoot = &mNodes[0];
|
mRoot = &mNodes[0];
|
||||||
|
|
||||||
for (int index = 0; index < mNodeCount; ++index) {
|
for (RmUint32 index = 0; index < mNodeCount; ++index) {
|
||||||
chunk_size = (sizeof(RmReal) * 3);
|
chunk_size = (sizeof(RmReal) * 3);
|
||||||
memcpy(&mNodes[index].mBounds.mMin, buf, chunk_size);
|
memcpy(&mNodes[index].mBounds.mMin, buf, chunk_size);
|
||||||
buf += chunk_size;
|
buf += chunk_size;
|
||||||
@ -1179,13 +1180,13 @@ void MyRaycastMesh::serialize(std::vector<char>& rm_buffer)
|
|||||||
|
|
||||||
RmUint32 lNodeIndex = TRI_EOF;
|
RmUint32 lNodeIndex = TRI_EOF;
|
||||||
if (mNodes[index].mLeft)
|
if (mNodes[index].mLeft)
|
||||||
lNodeIndex = ((RmUint32)mNodes[index].mLeft - (RmUint32)mNodes) / sizeof(NodeAABB);
|
lNodeIndex = ((uintptr_t)mNodes[index].mLeft - (uintptr_t)mNodes) / sizeof(NodeAABB);
|
||||||
memcpy(buf, &lNodeIndex, sizeof(RmUint32));
|
memcpy(buf, &lNodeIndex, sizeof(RmUint32));
|
||||||
buf += sizeof(RmUint32);
|
buf += sizeof(RmUint32);
|
||||||
|
|
||||||
RmUint32 rNodeIndex = TRI_EOF;
|
RmUint32 rNodeIndex = TRI_EOF;
|
||||||
if (mNodes[index].mRight)
|
if (mNodes[index].mRight)
|
||||||
rNodeIndex = ((RmUint32)mNodes[index].mRight - (RmUint32)mNodes) / sizeof(NodeAABB);
|
rNodeIndex = ((uintptr_t)mNodes[index].mRight - (uintptr_t)mNodes) / sizeof(NodeAABB);
|
||||||
memcpy(buf, &rNodeIndex, sizeof(RmUint32));
|
memcpy(buf, &rNodeIndex, sizeof(RmUint32));
|
||||||
buf += sizeof(RmUint32);
|
buf += sizeof(RmUint32);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user