#include <DataReplicator.h>
Inheritance diagram for ReplicatedObject:
Public Member Functions | |
virtual bool | InScope (PlayerID playerId, DataReplicator *dataReplicator) |
virtual void | OnScopeChange (PlayerID sender, bool isNowInScope, DataReplicator *dataReplicator) |
virtual bool | AcceptDereplicationRequest (PlayerID sender, DataReplicator *dataReplicator) |
virtual void | OnReplication (DataReplicator *dataReplicator) |
Convenience function called once, when the object is synchronized. If the object contains synchronized memory, this function is a good placeto call SynchronizeMemory. | |
virtual void | OnRemoteDereplication (DataReplicator *dataReplicator) |
virtual char * | GetObjectClassName (void) const =0 |
virtual bool | OnReceiveCreationRequest (PlayerID sender, RakNet::BitStream *inContext, RakNet::BitStream *outContext, PlayerID &objectOwner, DataReplicator *dataReplicator) |
virtual bool | OnCreationRequestAcceptance (PlayerID sender, ObjectID newObjectId, RakNet::BitStream *inContext, PlayerID &objectOwner, DataReplicator *dataReplicator) |
virtual void | OnCreationRequestRejection (PlayerID sender, RakNet::BitStream *inContext, DataReplicator *dataReplicator) |
virtual ObjectReplicationPushResult | OnSendCreationRequest (PlayerID destination, RakNet::BitStream *outContext, DataReplicator *dataReplicator) |
virtual ObjectReplicationPushResult | OnSendReplicationPush (PlayerID destination, RakNet::BitStream *outContext, DataReplicator *dataReplicator) |
virtual bool | OnReceiveReplicationPush (PlayerID sender, RakNet::BitStream *inContext, ObjectID newObjectId, PlayerID &objectOwner, DataReplicator *dataReplicator) |
void | SetOwner (PlayerID _owner) |
PlayerID | GetOwner (void) const |
bool | GetWaitingForCreationResponse (void) |
virtual PlayerID | GetNetworkIDAuthority (void) const =0 |
virtual bool | IsNetworkIDAuthority (void) const =0 |
Protected Attributes | |
PlayerID | owner |
|
A remote system has Unsynchronized an object and is notifying us of the desynchronizationIf you return true the DataReplicator will stop sending updates to that system if we send updates.If we do not send updates and we receive updates, the object will be Unsynchronized. Note that the object is not deleted.
|
|
For every group of systems, one system needs to be responsible for creating unique IDs for all objects created on all systems.This way, systems can send that id in packets to refer to objects (you can't send pointers because the memory allocations may be different).You must override this function to return the playerID of that system.
|
|
Return the name of the class of this object.
|
|
Gets the owner
|
|
Returns if this object is waiting for a response from the network ID authority to see if it can be created.
|
|
Return true if this object is in-scope relevant to the system designated by playerId
|
|
For every group of systems, one system needs to be responsible for creating unique IDs for all objects created on all systems.This way, systems can send that id in packets to refer to objects (you can't send pointers because the memory allocations may be different).In a client/server enviroment, the system that creates unique IDs would be the server.If this system is responsible for creating unique IDs, return true. Otherwise return false.
Implements NetworkIDGenerator. |
|
Our request to create an object has been accepted.
|
|
Our request to create an object has been rejected.
|
|
A remote system has asked that an instance of this class be created.To accept, return true. You will probably want to synchronize this class as well [Default does this already]
|
|
The inverse of OnSendReplicationPush, the other system wants to send an object to us that we didn't request.
|
|
Function called every time the object is dereplicated by remote systems that send those objects.
|
|
This object is either now in or now out of scope in relation to the system designated by playerId
|
|
Called when we need this object created on the authoritative system
|
|
Called when we have this object synchronized and the destination system does not.
|
|
Sets the owner
|
|
This is the system that owns a particular object, which means when that system disconnects, other instances of this object on remote systems will Get a call to OnRemoteDereplication |