Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 5, 2009, 1:54:27 PM (15 years ago)
Author:
scheusso
Message:

changed the process of classid (or networkid in the factory) synchronisation:
the packet classid synchronises all classid at once now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/network/packet/ClassID.h

    r2737 r2749  
    3838namespace packet {
    3939
    40 #define PACKET_FLAGS_CLASSID  ENET_PACKET_FLAG_RELIABLE
    41 #define _PACKETID             0
    42 #define _CLASSID              _PACKETID + sizeof(ENUM::Type)
    43 #define _CLASSNAMELENGTH      _CLASSID + sizeof(uint32_t)
    44 #define _CLASSNAME            _CLASSNAMELENGTH + sizeof(classNameLength_)
    4540 
    4641/**
     
    5045{
    5146public:
    52   ClassID( uint32_t classID, std::string className );
     47  ClassID( );
    5348  ClassID( uint8_t* data, unsigned int clientID );
    5449  ~ClassID();
    5550
    56   inline uint32_t getSize() const{ return sizeof(packet::ENUM::Type) + 2*sizeof(uint32_t) + classNameLength_; }
     51  uint32_t getSize() const;
    5752  bool process();
    5853
    59   uint32_t getClassID();
    60   uint32_t getClassNameLength(){ return classNameLength_; }
    61   const char *getClassName(){ return (const char*)(data_+_CLASSNAME); }
     54//   uint32_t getClassID();
     55//   uint32_t getClassNameLength(){ return classNameLength_; }
     56//   const char *getClassName(){ return (const char*)(data_+_CLASSNAME); }
    6257private:
    63   uint32_t classNameLength_;
     58//   uint32_t classNameLength_;
     59//   static bool alreadySetOneClassID_;
    6460};
    6561
Note: See TracChangeset for help on using the changeset viewer.