struct IGameContext { };
INetwork.h
Interface for a channel to call in order to create/destroy objects, and when changing context, to properly configure that context.
virtual ~IGameContext();
virtual void BeginUpdateObjects(CTimeValue physTime, INetChannel * pChannel) = 0;
virtual void BoundObject(EntityId id, NetworkAspectType nAspects) = 0;
An entity has been bound (we may wish to do something with that info).
virtual void CompleteUnbind(EntityId id) = 0;
virtual void ControlObject(EntityId id, bool bHaveControl) = 0;
We have control of an objects delegatable aspects (or not).
virtual INetSendableHookPtr CreateObjectSpawner(EntityId id, INetChannel * pChannel) = 0;
virtual void EndUpdateObjects() = 0;
virtual string GetConnectionString(CryFixedStringT<HOST_MIGRATION_MAX_PLAYER_NAME_SIZE>* pNameOverride, bool fake) const = 0;
virtual uint8 GetDefaultProfileForAspect(EntityId id, NetworkAspectType aspectID) = 0;
Fetches the default (spawned) profile for an aspect.
virtual void GetMemoryStatistics(ICrySizer* pSizer);
virtual CTimeValue GetPhysicsTime() = 0;
virtual INetAtSyncItem * HandleRMI(bool bClient, EntityId objID, uint8 funcID, TSerialize ser, INetChannel * pChannel) = 0;
Handles a remote method invocation.
virtual uint32 HashAspect(EntityId id, NetworkAspectType nAspect) = 0;
virtual bool InitChannelEstablishmentTasks(IContextEstablisher * pEst, INetChannel * pChannel, int establishedToken) = 0;
Initializes tasks that we need to perform on a channel to establish the game context.
virtual bool InitGlobalEstablishmentTasks(IContextEstablisher * pEst, int establishedToken) = 0;
Initializes global tasks that we need to perform to establish the game context.
virtual void ObjectInitClient(EntityId id, INetChannel * pChannel) = 0;
virtual void OnEndNetworkFrame() = 0;
virtual void OnStartNetworkFrame() = 0;
virtual void PassDemoPlaybackMappedOriginalServerPlayer(EntityId id) = 0;
Passes current demo playback mapped entity ID of the original demo recording server (local) player.
virtual void PlaybackBreakage(int breakId, INetBreakagePlaybackPtr pBreakage) = 0;
virtual void PlaybackSimpleBreakage(void* userData, INetBreakageSimplePlaybackPtr pBreakage);
virtual void* ReceiveSimpleBreakage(TSerialize ser);
virtual bool SendPostSpawnObject(EntityId id, INetChannel * pChannel) = 0;
virtual bool SetAspectProfile(EntityId id, NetworkAspectType nAspect, uint8 nProfile) = 0;
Changes the current profile of an object .
Game code should ensure that things work out correctly.
Change physicalization.
virtual ESynchObjectResult SynchObject(EntityId id, NetworkAspectType nAspect, uint8 nCurrentProfile, TSerialize ser, bool verboseLogging) = 0;
Synchronizes a single aspect of an entity
nAspect will have exactly one bit set describing which aspect to synch.
virtual void UnboundObject(EntityId id) = 0;
An entity has been unbound (we may wish to destroy it).