IGameContext

C++
struct IGameContext {
};
File

INetwork.h

Description

Interface for a channel to call in order to create/destroy objects, and when changing context, to properly configure that context.

IGameContext::~IGameContext Destructor
C++
virtual ~IGameContext();
IGameContext::BeginUpdateObjects Method
C++
virtual void BeginUpdateObjects(CTimeValue physTime, INetChannel * pChannel) = 0;
IGameContext::BoundObject Method
C++
virtual void BoundObject(EntityId id, NetworkAspectType nAspects) = 0;
Description

An entity has been bound (we may wish to do something with that info).

IGameContext::CompleteUnbind Method
C++
virtual void CompleteUnbind(EntityId id) = 0;
IGameContext::ControlObject Method
C++
virtual void ControlObject(EntityId id, bool bHaveControl) = 0;
Description

We have control of an objects delegatable aspects (or not).

IGameContext::CreateObjectSpawner Method
C++
virtual INetSendableHookPtr CreateObjectSpawner(EntityId id, INetChannel * pChannel) = 0;
IGameContext::EndUpdateObjects Method
C++
virtual void EndUpdateObjects() = 0;
IGameContext::GetConnectionString Method
C++
virtual string GetConnectionString(CryFixedStringT<HOST_MIGRATION_MAX_PLAYER_NAME_SIZE>* pNameOverride, bool fake) const = 0;
IGameContext::GetDefaultProfileForAspect Method
C++
virtual uint8 GetDefaultProfileForAspect(EntityId id, NetworkAspectType aspectID) = 0;
Description

Fetches the default (spawned) profile for an aspect.

IGameContext::GetMemoryStatistics Method
C++
virtual void GetMemoryStatistics(ICrySizer* pSizer);
IGameContext::GetPhysicsTime Method
C++
virtual CTimeValue GetPhysicsTime() = 0;
IGameContext::HandleRMI Method
C++
virtual INetAtSyncItem * HandleRMI(bool bClient, EntityId objID, uint8 funcID, TSerialize ser, INetChannel * pChannel) = 0;
Description

Handles a remote method invocation.

IGameContext::HashAspect Method
C++
virtual uint32 HashAspect(EntityId id, NetworkAspectType nAspect) = 0;
IGameContext::InitChannelEstablishmentTasks Method
C++
virtual bool InitChannelEstablishmentTasks(IContextEstablisher * pEst, INetChannel * pChannel, int establishedToken) = 0;
Description

Initializes tasks that we need to perform on a channel to establish the game context.

IGameContext::InitGlobalEstablishmentTasks Method
C++
virtual bool InitGlobalEstablishmentTasks(IContextEstablisher * pEst, int establishedToken) = 0;
Description

Initializes global tasks that we need to perform to establish the game context.

IGameContext::ObjectInitClient Method
C++
virtual void ObjectInitClient(EntityId id, INetChannel * pChannel) = 0;
IGameContext::OnEndNetworkFrame Method
C++
virtual void OnEndNetworkFrame() = 0;
IGameContext::OnStartNetworkFrame Method
C++
virtual void OnStartNetworkFrame() = 0;
IGameContext::PassDemoPlaybackMappedOriginalServerPlayer Method
C++
virtual void PassDemoPlaybackMappedOriginalServerPlayer(EntityId id) = 0;
Description

Passes current demo playback mapped entity ID of the original demo recording server (local) player.

IGameContext::PlaybackBreakage Method
C++
virtual void PlaybackBreakage(int breakId, INetBreakagePlaybackPtr pBreakage) = 0;
IGameContext::PlaybackSimpleBreakage Method
C++
virtual void PlaybackSimpleBreakage(void* userData, INetBreakageSimplePlaybackPtr pBreakage);
IGameContext::ReceiveSimpleBreakage Method
C++
virtual void* ReceiveSimpleBreakage(TSerialize ser);
IGameContext::SendPostSpawnObject Method
C++
virtual bool SendPostSpawnObject(EntityId id, INetChannel * pChannel) = 0;
IGameContext::SetAspectProfile Method
C++
virtual bool SetAspectProfile(EntityId id, NetworkAspectType nAspect, uint8 nProfile) = 0;
Description

Changes the current profile of an object .

Notes

Game code should ensure that things work out correctly.

Example

Change physicalization.

IGameContext::SynchObject Method
C++
virtual ESynchObjectResult SynchObject(EntityId id, NetworkAspectType nAspect, uint8 nCurrentProfile, TSerialize ser, bool verboseLogging) = 0;
Description

Synchronizes a single aspect of an entity

Notes

nAspect will have exactly one bit set describing which aspect to synch.

IGameContext::UnboundObject Method
C++
virtual void UnboundObject(EntityId id) = 0;
Description

An entity has been unbound (we may wish to destroy it).