move write_object to NetworkMessage, fix player sync, and implement projectile sync
#ifndef NETWORK_MESSAGE_HH
#define NETWORK_MESSAGE_HH
/**
* @file
*
* NetworkPacket for use with NetworkObjects
*/
#include "Channel.hh"
#include "Object.hh"
/**
* NetworkMessages are NetworkPackets that are related to some specfic NetworkObject and its NetworkObjectController.
*/
class NetworkMessage : public NetworkChannelPacket {
public:
/**
* Create a message of the given type to be sent on the given object
*/
NetworkMessage (NetworkObject &obj, NetworkMessageID msg_id);
/**
* Write the given Object's NetworkObjectID (or 0, if the obj is NULL) to this p acket
*
* @param obj the NetworkObject* whose NetworkObjectID to write to the packet, or NULL to write zero
*/
void write_object (const NetworkObject *obj);
};
#endif /* NETWORK_MESSAGE_HH */