Changeset 1711 for code/branches/network/src/network/packet/ClassID.cc
- Timestamp:
- Sep 5, 2008, 11:32:42 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/network/packet/ClassID.cc
r1708 r1711 1 /* 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * > www.orxonox.net < 4 * 5 * 6 * License notice: 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License 10 * as published by the Free Software Foundation; either version 2 11 * of the License, or (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 * 22 * Author: 23 * Oliver Scheuss, (C) 2008 24 * Co-authors: 25 * ... 26 * 27 */ 28 29 30 1 31 #include "ClassID.h" 2 #include "Packet.h"3 32 #include "core/CoreIncludes.h" 4 33 #include <string> … … 15 44 16 45 ClassID::ClassID( unsigned int classID, std::string className ) 17 : Packet Content()46 : Packet() 18 47 { 19 48 flags_ = flags_ | PACKET_FLAGS_CLASSID; … … 29 58 30 59 ClassID::ClassID( unsigned char *data, int clientID ) 31 : Packet Content(data, clientID)60 : Packet(data, clientID) 32 61 { 33 62 memcpy( (void *)&classNameLength_, &data[ _CLASSNAMELENGTH ], sizeof(classNameLength_) ); … … 36 65 ClassID::~ClassID() 37 66 { 38 }39 40 unsigned char *ClassID::getData(){41 return data_;42 67 } 43 68 … … 51 76 return false; 52 77 id->setNetworkID( getClassID() ); 78 delete this; 53 79 return true; 54 80 } … … 58 84 } 59 85 60 // unsigned int ClassID::getClassNameLength(){61 // return *(unsigned int *)&data[ _CLASSNAMELENGTH ];62 // }63 64 86 } //namespace packet 65 87 }//namespace network
Note: See TracChangeset
for help on using the changeset viewer.