Changeset 3227
- Timestamp:
- Jun 23, 2009, 8:53:51 PM (16 years ago)
- Location:
- code/branches/netp6/src
- Files:
-
- 2 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/netp6/src/network/CMakeLists.txt
r3214 r3227 31 31 NetworkFunction.cc 32 32 Host.cc 33 PacketBuffer.cc34 33 Server.cc 35 34 ServerConnection.cc -
code/branches/netp6/src/network/GamestateClient.cc
r3214 r3227 52 52 53 53 GamestateClient::~GamestateClient() { 54 std::map<unsigned int, packet::Gamestate *>::iterator it; 55 for ( it = this->gamestateMap_.begin(); it != this->gamestateMap_.end(); ++it ) 56 delete (*it).second; 57 if( this->tempGamestate_ ) 58 delete this->tempGamestate_; 54 59 } 55 60 -
code/branches/netp6/src/network/GamestateClient.h
r3214 r3227 73 73 std::map<unsigned int, packet::Gamestate *> gamestateMap_; 74 74 packet::Gamestate *tempGamestate_; // we save the received gamestates here during processQueue 75 unsigned char *shipCache_;76 75 77 76 }; -
code/branches/netp6/src/network/GamestateManager.cc
r3214 r3227 61 61 { 62 62 if( this->reference ) 63 delete this->reference;64 for( std::map<unsigned int, packet::Gamestate*>::iterator it = gamestateQueue.begin(); it != gamestateQueue.end(); it++)63 delete this->reference;std::map<unsigned int, packet::Gamestate*>::iterator it; 64 for( it = gamestateQueue.begin(); it != gamestateQueue.end(); ++it ) 65 65 delete (*it).second; 66 std::map<unsigned int, std::map<unsigned int, packet::Gamestate*> >::iterator it1; 67 std::map<unsigned int, packet::Gamestate*>::iterator it2; 68 for( it1 = gamestateMap_.begin(); it1 != gamestateMap_.end(); ++it1 ) 69 { 70 for( it2 = it1->second.begin(); it2 != it1->second.end(); ++it2 ) 71 delete (*it2).second; 72 } 66 73 delete trafficControl_; 67 74 } -
code/branches/netp6/src/network/NetworkPrereqs.h
r3214 r3227 102 102 template <class T> class NetworkMemeberFunction; 103 103 struct NetworkFunctionPointer; 104 class PacketBuffer;105 104 class Server; 106 105 class ServerConnection; -
code/branches/netp6/src/network/synchronisable/Synchronisable.h
r3214 r3227 43 43 #include "NetworkCallback.h" 44 44 45 /*#define REGISTERDATA(varname, ...) \46 registerVariable((void*)&varname, sizeof(varname), DATA, __VA_ARGS__)47 #define REGISTERSTRING(stringname, ...) \48 registerVariable(&stringname, stringname.length()+1, STRING, __VA_ARGS__)*/49 45 50 46 namespace orxonox -
code/branches/netp6/src/network/synchronisable/SynchronisableSpecialisations.cc
r3214 r3227 73 73 registerVariable(variable.y, mode, cb, bidirectional); 74 74 } 75 // template <> void Synchronisable::registerVariable( Vector2& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional)76 // {77 // registerVariable( (const ColourValue&)variable, mode, cb, bidirectional);78 // }79 75 80 76 template <> void Synchronisable::registerVariable( const Vector3& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional) -
code/branches/netp6/src/util/Serialise.h
r3084 r3227 408 408 template <> inline void loadAndIncrease( const std::string& variable, uint8_t*& mem ) 409 409 { 410 *(std::string*)( &variable ) = std::string((const char *)mem);410 *(std::string*)( &variable ) = (const char *)mem; 411 411 mem += variable.length()+1; 412 412 } … … 414 414 template <> inline bool checkEquality( const std::string& variable, uint8_t* mem ) 415 415 { 416 return std::string((const char*)mem)==variable; 416 //return std::string((const char*)mem)==variable; 417 return (const char*)mem==variable; 417 418 } 418 419
Note: See TracChangeset
for help on using the changeset viewer.