mirror of
https://github.com/Ragora/T2-CPP.git
synced 2026-02-21 07:33:36 +00:00
Restructured project structure to use a singular SLN; made the T2API common to all projects; adjusted watchdog timer to 8 seconds
This commit is contained in:
parent
e1c5d1dead
commit
527474ff24
79 changed files with 469 additions and 626 deletions
69
CommonAPI/Common/include/DXAPI/NetConnection.h
Normal file
69
CommonAPI/Common/include/DXAPI/NetConnection.h
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
#pragma once
|
||||
|
||||
#include <DXAPI/Point3F.h>
|
||||
#include <DXAPI/SimObject.h>
|
||||
#include <DXAPI/NetObject.h>
|
||||
#include <LinkerAPI.h>
|
||||
struct GhostInfo;
|
||||
namespace DX
|
||||
{
|
||||
class NetConnection : public SimObject
|
||||
{
|
||||
public:
|
||||
NetConnection(unsigned int obj);
|
||||
S32 getGhostIndex(NetObject obj);
|
||||
unsigned char getGhostFrom();
|
||||
unsigned char getGhostTo();
|
||||
NetObject resolveGhostParent(S32 id);
|
||||
NetObject resolveGhost(S32 id);
|
||||
unsigned int actualbaseptr;
|
||||
GhostInfo * mGhostRefs;
|
||||
NetObject **mLocalGhosts;
|
||||
};
|
||||
} // End NameSpace DX
|
||||
struct GhostRef;
|
||||
struct GhostInfo
|
||||
{
|
||||
// public: // required for MSVC
|
||||
|
||||
// NOTE:
|
||||
// if the size of this structure changes, the
|
||||
// NetConnection::getGhostIndex function MUST be changed
|
||||
// to reflect.
|
||||
|
||||
U32 *obj; // the real object
|
||||
U32 updateMask; // 32 bits of object info
|
||||
GhostRef *updateChain; // chain of updates for this object in packets
|
||||
GhostInfo *nextObjectRef; // next ghost ref for this object (another connection)
|
||||
|
||||
GhostInfo *prevObjectRef; // prev ghost ref for this object
|
||||
U32 *connection;
|
||||
GhostInfo *nextLookupInfo;
|
||||
U32 updateSkipCount;
|
||||
|
||||
U32 flags;
|
||||
F32 priority;
|
||||
U32 index;
|
||||
U32 arrayIndex;
|
||||
|
||||
enum Flags
|
||||
{
|
||||
Valid = BIT(0),
|
||||
InScope = BIT(1),
|
||||
ScopeAlways = BIT(2),
|
||||
NotYetGhosted = BIT(3),
|
||||
Ghosting = BIT(4),
|
||||
KillGhost = BIT(5),
|
||||
KillingGhost = BIT(6),
|
||||
ScopedEvent = BIT(7),
|
||||
ScopeLocalAlways = BIT(8),
|
||||
};
|
||||
};
|
||||
struct GhostRef
|
||||
{
|
||||
U32 mask;
|
||||
U32 ghostInfoFlags;
|
||||
GhostInfo *ghost;
|
||||
GhostRef *nextRef;
|
||||
GhostRef *nextUpdateChain;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue