IGameObject

Interface used to interact with a game object

C++
struct IGameObject : public IActionListener {
public:
  class CRMIBody : public IRMIMessageBody;
public:
  template <class T>
class CRMIBodyImpl : public CRMIBody;
public:
  enum EChangeExtension {
    eCE_Activate,
    eCE_Deactivate,
    eCE_Acquire,
    eCE_Release
  };
public:
  EntityId m_entityId;
public:
  IMovementController * m_pMovementController;
public:
  IEntity * m_pEntity;
};
File

IGameObject.h

See Also
IGameObject::CRMIBody Class
Class Hierarchy
C++
class CRMIBody : public IRMIMessageBody;
File

IGameObject.h

IGameObject::CRMIBody::CRMIBody Constructor
C++
IGameObject::CRMIBodyImpl Template
Class Hierarchy
C++
template <class T>
class CRMIBodyImpl : public CRMIBody;
File

IGameObject.h

IGameObject::CRMIBodyImpl::Create Method
C++
static CRMIBodyImpl * Create(const SGameObjectExtensionRMI * method, EntityId id, const T& params, IRMIListener * pListener, int userId, EntityId dependentId);
IGameObject::CRMIBodyImpl::DeleteThis Method
C++
void DeleteThis();
IGameObject::CRMIBodyImpl::GetSize Method
C++
size_t GetSize();
IGameObject::CRMIBodyImpl::SerializeWith Method
C++
void SerializeWith(TSerialize ser);
IGameObject::EChangeExtension Enumeration
C++
enum EChangeExtension {
  eCE_Activate,
  eCE_Deactivate,
  eCE_Acquire,
  eCE_Release
};
File

IGameObject.h

IGameObject::m_entityId Data Member
C++
EntityId m_entityId;
IGameObject::m_pEntity Data Member
C++
IEntity * m_pEntity;
IGameObject::m_pMovementController Data Member
C++
IMovementController * m_pMovementController;
IGameObject::AcquireExtension Method
C++
IGameObjectExtension * AcquireExtension(const char * extension);
Description

forcefully get a pointer to an extension (may instantiate if needed)

IGameObject::ActivateExtension Method
C++
bool ActivateExtension(const char * extension);
Description

turn an extension on

IGameObject::AttachDistanceChecker Method
C++
virtual void AttachDistanceChecker() = 0;
IGameObject::BindToNetwork Method
C++
virtual bool BindToNetwork(EBindToNetworkMode mode = eBTNM_Normal) = 0;
Description

bind this entity to the network system (it gets synchronized then...)

IGameObject::BindToNetworkWithParent Method
C++
virtual bool BindToNetworkWithParent(EBindToNetworkMode mode, EntityId parentId) = 0;
Description

bind this entity to the network system, with a dependency on it's parent

IGameObject::CaptureActions Method
C++
virtual bool CaptureActions(IActionListener * pAL) = 0;
IGameObject::CaptureProfileManager Method
C++
virtual bool CaptureProfileManager(IGameObjectProfileManager * pPH) = 0;
IGameObject::CaptureView Method
C++
virtual bool CaptureView(IGameObjectView * pGOV) = 0;
Description

for extensions to register for special things

IGameObject::ChangedNetworkState Method
C++
virtual void ChangedNetworkState(NetworkAspectType aspects) = 0;
Description

flag that we have changed the state of the game object aspect

IGameObject::DeactivateExtension Method
C++
void DeactivateExtension(const char * extension);
Description

turn an extension off

IGameObject::DisablePostUpdates Method
C++
virtual void DisablePostUpdates(IGameObjectExtension * pExtension) = 0;
IGameObject::DisableUpdateSlot Method
C++
virtual void DisableUpdateSlot(IGameObjectExtension * pExtension, int slot) = 0;
IGameObject::DontSyncPhysics Method
C++
virtual void DontSyncPhysics() = 0;
Description

A one off call to never enable the physics aspect, this needs to be done *before* the BindToNetwork (typically in the GameObject's Init function)

IGameObject::EnableAspect Method
C++
virtual void EnableAspect(NetworkAspectType aspects, bool enable) = 0;
Description

enable/disable network aspects on game object

IGameObject::EnableDelegatableAspect Method
C++
virtual void EnableDelegatableAspect(NetworkAspectType aspects, bool enable) = 0;
Description

enable/disable delegatable aspects

IGameObject::EnablePhysicsEvent Method
C++
virtual void EnablePhysicsEvent(bool enable, int events) = 0;
Description

enable/disable sending physics events to this game object

IGameObject::EnablePostUpdates Method
C++
virtual void EnablePostUpdates(IGameObjectExtension * pExtension) = 0;
IGameObject::EnablePrePhysicsUpdate Method
C++
virtual void EnablePrePhysicsUpdate(EPrePhysicsUpdate updateRule) = 0;
IGameObject::EnableUpdateSlot Method
C++
virtual void EnableUpdateSlot(IGameObjectExtension * pExtension, int slot) = 0;
IGameObject::ForceUpdate Method
C++
virtual void ForceUpdate(bool force) = 0;
Description

force the object to update even if extensions' slots are "sleeping"...

IGameObject::ForceUpdateExtension Method
C++
virtual void ForceUpdateExtension(IGameObjectExtension * pGOE, int slot) = 0;
IGameObject::FullSerialize Method
C++
virtual void FullSerialize(TSerialize ser) = 0;
Description

serialize some aspects of the game object

IGameObject::GetAspectProfile Method
C++
virtual uint8 GetAspectProfile(EEntityAspects aspect) = 0;
IGameObject::GetChannelId Method
C++
virtual uint16 GetChannelId() const = 0;
Description

get/set network channel

IGameObject::GetEntity Method
C++
IEntity * GetEntity() const;
Description

retrieve the hosting entity

IGameObject::GetEntityId Method
C++
EntityId GetEntityId() const;
IGameObject::GetExtensionParams Method
C++
virtual bool GetExtensionParams(const char * extension, SmartScriptTable params) = 0;
Description

get extension parameters

IGameObject::GetExtensionWithRMIBase Method
C++
virtual IGameObjectExtension * GetExtensionWithRMIBase(const void * pBase) = 0;
IGameObject::GetMemoryUsage Method
C++
virtual void GetMemoryUsage(ICrySizer * pSizer) const;
IGameObject::GetMovementController Method
C++
virtual IMovementController * GetMovementController();
IGameObject::GetNetChannel Method
C++
virtual INetChannel * GetNetChannel() const = 0;
IGameObject::GetPredictionHandle Method
C++
virtual int GetPredictionHandle() = 0;
IGameObject::GetUpdateSlotEnables Method
C++
virtual uint8 GetUpdateSlotEnables(IGameObjectExtension * pExtension, int slot) = 0;
IGameObject::GetWorldQuery Method
C++
virtual IWorldQuery* GetWorldQuery() = 0;
IGameObject::IGameObject Constructor
C++
IGameObject();
IGameObject::InvokeRMI Method
C++
template <class MI, class T> void InvokeRMI(const MI method, const T& params, unsigned where, int channel = -1);
IGameObject::InvokeRMI_Primitive Method
C++
template <class MI, class T> void InvokeRMI_Primitive(const MI method, const T& params, unsigned where, IRMIListener * pListener, int userId, int channel, EntityId dependentId);
IGameObject::InvokeRMIWithDependentObject Method
C++
template <class MI, class T> void InvokeRMIWithDependentObject(const MI method, const T& params, unsigned where, EntityId ent, int channel = -1);
Description

WARNING: there *MUST* be at least one frame between spawning ent and using this function to send an RMI if that RMI is _FAST, otherwise the dependent entity is ignored

IGameObject::IsJustExchanging Method
C++
virtual bool IsJustExchanging() = 0;
IGameObject::IsProbablyDistant Method
C++
virtual bool IsProbablyDistant() = 0;
IGameObject::IsProbablyVisible Method
C++
virtual bool IsProbablyVisible() = 0;
Description

is the game object probably visible?

IGameObject::NetSerialize Method
C++
virtual bool NetSerialize(TSerialize ser, EEntityAspects aspect, uint8 profile, int pflags) = 0;
IGameObject::PostSerialize Method
C++
virtual void PostSerialize() = 0;
Description

in case things have to be set after serialization

IGameObject::PostUpdate Method
C++
virtual void PostUpdate(float frameTime) = 0;
IGameObject::Pulse Method
C++
virtual void Pulse(uint32 pulse) = 0;
IGameObject::QueryExtension Method
C++
virtual IGameObjectExtension * QueryExtension(const char * name) const = 0;
Description

query extension. returns 0 if extension is not there.

IGameObject::RegisterAsPredicted Method
C++
virtual void RegisterAsPredicted() = 0;
IGameObject::RegisterAsValidated Method
C++
virtual void RegisterAsValidated(IGameObject* pGO, int predictionHandle) = 0;
IGameObject::RegisterExtForEvents Method
C++
virtual void RegisterExtForEvents(IGameObjectExtension* piExtention, const int* pEvents, const int numEvents) = 0;
IGameObject::ReleaseActions Method
C++
virtual void ReleaseActions(IActionListener * pAL) = 0;
IGameObject::ReleaseExtension Method
C++
void ReleaseExtension(const char * extension);
Description

release a previously acquired extension

IGameObject::ReleaseProfileManager Method
C++
virtual void ReleaseProfileManager(IGameObjectProfileManager * pPH) = 0;
IGameObject::ReleaseView Method
C++
virtual void ReleaseView(IGameObjectView * pGOV) = 0;
IGameObject::RequestRemoteUpdate Method
C++
virtual void RequestRemoteUpdate(NetworkAspectType aspectMask) = 0;
Description

register a partial update in the netcode without actually serializing - useful only for working around other bugs

IGameObject::SendEvent Method
C++
virtual void SendEvent(const SGameObjectEvent&) = 0;
Description

send a game object event

IGameObject::SetAIActivation Method
C++
virtual bool SetAIActivation(EGameObjectAIActivationMode mode) = 0;
Description

enable/disable AI activation flag

IGameObject::SetAspectProfile Method
C++
virtual bool SetAspectProfile(EEntityAspects aspect, uint8 profile, bool fromNetwork = false) = 0;
Description

change the profile of an aspect

IGameObject::SetAutoDisablePhysicsMode Method
C++
virtual void SetAutoDisablePhysicsMode(EAutoDisablePhysicsMode mode) = 0;
Description

enable/disable auto-disabling of physics

IGameObject::SetChannelId Method
C++
virtual void SetChannelId(uint16) = 0;
IGameObject::SetExtensionParams Method
C++
virtual bool SetExtensionParams(const char * extension, SmartScriptTable params) = 0;
Description

set extension parameters

IGameObject::SetMovementController Method
C++
void SetMovementController(IMovementController * pMC);
IGameObject::SetNetworkParent Method
C++
virtual void SetNetworkParent(EntityId id) = 0;
IGameObject::SetUpdateSlotEnableCondition Method
C++
virtual void SetUpdateSlotEnableCondition(IGameObjectExtension * pExtension, int slot, EUpdateEnableCondition condition) = 0;
IGameObject::ShouldUpdate Method
C++
virtual bool ShouldUpdate() = 0;
Description

for debugging updates

IGameObject::UnRegisterExtForEvents Method
C++
virtual void UnRegisterExtForEvents(IGameObjectExtension* piExtention, const int* pEvents, const int numEvents) = 0;
IGameObject::WantsPhysicsEvent Method
C++
virtual bool WantsPhysicsEvent(int events) = 0;