kplayer.cpp
138 kdDebug(11001) << k_funcinfo << ": to game sender="<<sender<<"" << "recv="<<receiver <<"msgid="<<msgid << endl;
355 //kdDebug(11001) << k_funcinfo ": msgid=" << msgid << " sender=" << sender << " we are=" << id() << endl;
virtual void initIO(KPlayer *p)
Init this device by setting the player and e.g.
Definition: kgameio.cpp:66
bool sendSystemMessage(const TQByteArray &buffer, int msgid, TQ_UINT32 receiver=0, TQ_UINT32 sender=0)
Sends a network message msg with a given msg id msgid to all clients.
Definition: kgamenetwork.cpp:396
void setOptimized(bool p)
Sets this property to try to optimize signal and network handling by not sending it out when the prop...
Definition: kgameproperty.h:169
void setEmittingSignal(bool p)
Sets this property to emit a signal on value changed.
Definition: kgameproperty.h:157
int registerData(int id, KGamePropertyHandler *owner, PropertyPolicy p, TQString name=0)
You have to register a KGamePropertyBase before you can use it.
Definition: kgameproperty.cpp:91
A collection class for KGameProperty objects.
Definition: kgamepropertyhandler.h:73
bool setLocal(type v)
This function sets the value of the property directly, i.e.
Definition: kgameproperty.h:715
bool sendPlayerProperty(int msgid, TQDataStream &s, TQ_UINT32 playerId)
This is called by KPlayer::sendProperty only! Internal function!
Definition: kgame.cpp:1428
virtual bool sendPlayerInput(TQDataStream &msg, KPlayer *player, TQ_UINT32 sender=0)
Called by KPlayer to send a player input to the KMessageServer.
Definition: kgame.cpp:709
void addPlayer(KPlayer *newplayer)
Note that KPlayer::save must be implemented properly, as well as KPlayer::rtti This will only send a ...
Definition: kgame.cpp:412
void playerDeleted(KPlayer *player)
Called by the destructor of KPlayer to remove itself from the game.
Definition: kgame.cpp:492
virtual bool systemPlayerInput(TQDataStream &msg, KPlayer *player, TQ_UINT32 sender=0)
Called when a player input arrives from KMessageServer.
Definition: kgame.cpp:727
bool isVirtual() const
Is this player a virtual player, ie is it created by mirroring a real player from another network gam...
Definition: kplayer.cpp:204
virtual bool save(TQDataStream &stream)
Save a player to a file OR to network.
Definition: kplayer.cpp:340
KGameIO * findRttiIO(int rtti) const
Finds the KGameIO devies with the given rtti code.
Definition: kplayer.cpp:259
KGamePropertyBase * findProperty(int id) const
Searches for a property of the player given its id.
Definition: kplayer.cpp:389
void signalPropertyChanged(KGamePropertyBase *property, KPlayer *me)
This signal is emmited if a player property changes its value and the property is set to notify this ...
void signalNetworkData(int msgid, const TQByteArray &buffer, TQ_UINT32 sender, KPlayer *me)
The player object got a message which was targeted at it but has no default method to process it.
KPlayer * networkPlayer() const
Returns the player which got inactivated to allow this player to be set up via network.
Definition: kplayer.cpp:210
void sendProperty(int msgid, TQDataStream &stream, bool *sent)
Called by KGameProperty only! Internal function!
Definition: kplayer.cpp:399
void emitSignal(KGamePropertyBase *me)
Called by KGameProperty only! Internal function!
Definition: kplayer.cpp:411
void networkTransmission(TQDataStream &stream, int msgid, TQ_UINT32 sender)
Receives a message.
Definition: kplayer.cpp:353
virtual const TQString & group() const
Query the group the player belongs to.
Definition: kplayer.cpp:186
bool removeGameIO(KGameIO *input=0, bool deleteit=true)
remove (and delete) a game IO device
Definition: kplayer.cpp:231
virtual bool forwardMessage(TQDataStream &msg, int msgid, TQ_UINT32 receiver=0, TQ_UINT32 sender=0)
Forwards Message to the game object..internal use only.
Definition: kplayer.cpp:128
bool setTurn(bool b, bool exclusive=true)
Sets whether this player is the next to turn.
Definition: kplayer.cpp:285
virtual bool forwardInput(TQDataStream &msg, bool transmit=true, TQ_UINT32 sender=0)
Forwards input to the game object..internal use only.
Definition: kplayer.cpp:142
void setNetworkPriority(int b)
Set whether this player can be replaced by a network player.
Definition: kplayer.cpp:216
int networkPriority() const
Returns whether this player can be replaced by a network connection player.
Definition: kplayer.cpp:213
virtual bool load(TQDataStream &stream)
Load a saved player, from file OR network.
Definition: kplayer.cpp:314