Fix 32 bit / 64 bit multiplayer interop problem

- Fix gids to be calculated the same on 32 bit and 64 bit platforms.
  Previously they were byte offsets into a pointer array, which meant
  multiple of 4 on 32 bit platforms, and multiple of 8 on 64 bit platforms.
  Now they are indexes.
This commit is contained in:
Scott Ludwig 2016-01-13 22:25:34 -08:00
parent 83a84abc08
commit 622b960b10

View File

@ -1281,8 +1281,8 @@ Direction16 CalcDir16(int dx, int dy)
// GobMgr implementation
//
#define PpgobFromGid(gid) ((Gob **)((byte *)m_apgobMaster + (gid)))
#define GidFromPpgob(ppgob) ((byte *)(ppgob) - (byte *)m_apgobMaster)
#define PpgobFromGid(gid) (&m_apgobMaster[gid])
#define GidFromPpgob(ppgob) ((ppgob) - m_apgobMaster)
#define MakeUsedEntry(pw) (Gob **)((pword)(pw) & ~1)
#define MakeFreeEntry(pw) (Gob *)((pword)(pw) | 1)
#define IsFreeEntry(pw) ((pword)(pw) & 1)