Changeset 1952 for code/branches/objecthierarchy/src
- Timestamp:
- Oct 19, 2008, 8:42:39 PM (16 years ago)
- Location:
- code/branches/objecthierarchy/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/core/Identifier.h
r1947 r1952 61 61 #include <typeinfo> 62 62 #include <stdlib.h> 63 #include <cassert> 63 64 64 65 #include "MetaObjectList.h" -
code/branches/objecthierarchy/src/network/ClientInformation.cc
r1735 r1952 185 185 ClientInformation *ClientInformation::insertBack(ClientInformation *ins) { 186 186 ClientInformation *temp = head_; 187 if(temp== head_){187 if(temp==ins){ 188 188 return head_; 189 189 } -
code/branches/objecthierarchy/src/network/Server.cc
r1944 r1952 282 282 283 283 bool Server::addClient(ENetEvent *event){ 284 unsigned int newid=0; 285 284 static unsigned int newid=1; 285 286 COUT(2) << "Server: adding client" << std::endl; 286 287 ClientInformation *temp = ClientInformation::insertBack(new ClientInformation); 287 288 if(!temp){ … … 289 290 return false; 290 291 } 291 if(temp==ClientInformation::getBegin()) { //not good if you use anything else than insertBack292 /*if(temp==ClientInformation::getBegin()) { //not good if you use anything else than insertBack 292 293 newid=1; 293 294 } 294 295 else 295 newid=temp->prev()->getID()+1; 296 newid=temp->prev()->getID()+1;*/ 296 297 temp->setID(newid); 297 298 temp->setPeer(event->peer); … … 303 304 listener++; 304 305 } 306 307 newid++; 305 308 306 309 COUT(3) << "Server: added client id: " << temp->getID() << std::endl; -
code/branches/objecthierarchy/src/network/packet/Packet.cc
r1940 r1952 135 135 Packet *Packet::createPacket(ENetPacket *packet, ENetPeer *peer){ 136 136 uint8_t *data = packet->data; 137 assert(ClientInformation::findClient(&peer->address)->getID()!=-2 || !Host::isServer()); 137 138 unsigned int clientID = ClientInformation::findClient(&peer->address)->getID(); 138 139 Packet *p;
Note: See TracChangeset
for help on using the changeset viewer.