Changeset 6337 in orxonox.OLD for branches/network/src/lib/lang/base_object.cc
- Timestamp:
- Dec 30, 2005, 1:32:46 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/lang/base_object.cc
r6275 r6337 22 22 #include "compiler.h" 23 23 #include "class_list.h" 24 25 #include "synchronizeable.h" 24 26 25 27 using namespace std; … … 194 196 PRINT(0)(" -Weapon-"); 195 197 PRINT(0)("\n"); 196 } 197 } 198 } 199 } 200 201 /** 202 * Writes data from network containing information about the state 203 * @param data pointer to data 204 * @param length length of data 205 * @param sender hostID of sender 206 */ 207 int BaseObject::writeState( const byte * data, int length, int sender ) 208 { 209 SYNCHELP_READ_BEGIN(); 210 211 if ( objectName ) 212 { 213 delete[] objectName; 214 objectName = NULL; 215 } 216 SYNCHELP_READ_STRINGM( this->objectName ); 217 218 return SYNCHELP_READ_N; 219 } 220 221 /** 222 * data copied in data will bee sent to another host 223 * @param data pointer to data 224 * @param maxLength max length of data 225 * @return the number of bytes writen 226 */ 227 int BaseObject::readState( byte * data, int maxLength ) 228 { 229 SYNCHELP_WRITE_BEGIN(); 230 231 SYNCHELP_WRITE_STRING( this->objectName ); 232 233 return SYNCHELP_WRITE_N; 234 }
Note: See TracChangeset
for help on using the changeset viewer.