Changeset 1711 for code/branches/network/src/network/packet/Chat.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/Chat.cc
r1705 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 <scheusso [at] ee.ethz.ch>, (C) 2008 24 * Co-authors: 25 * ... 26 * 27 */ 28 1 29 #include "Chat.h" 2 #include "Packet.h"30 #include <assert.h> 3 31 4 32 namespace network { … … 11 39 12 40 Chat::Chat( std::string& message, int clientID ) 13 : Packet Content()41 : Packet() 14 42 { 15 43 flags_ = flags_ | PACKET_FLAGS_CHAT; … … 23 51 24 52 Chat::Chat( unsigned char *data, int clientID ) 25 : Packet Content(data, clientID)53 : Packet(data, clientID) 26 54 { 27 55 messageLength_ = *(unsigned int *)&data[ _MESSAGELENGTH ]; … … 32 60 } 33 61 34 unsigned char *Chat::getData(){35 return data_;36 }37 38 62 unsigned int Chat::getSize() const{ 39 63 return _MESSAGE + messageLength_; … … 42 66 bool Chat::process(){ 43 67 //TODO: change this !!! 68 assert(0); 69 delete this; 44 70 return true; 45 71 }
Note: See TracChangeset
for help on using the changeset viewer.