Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 5, 2008, 11:32:42 PM (16 years ago)
Author:
scheusso
Message:

we use enetcallback for destroying packets now (unfortunately there are still some problems)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/network/packet/Welcome.cc

    r1709 r1711  
     1
     2
     3/*
     4 *   ORXONOX - the hottest 3D action shooter ever to exist
     5 *                    > www.orxonox.net <
     6 *
     7 *
     8 *   License notice:
     9 *
     10 *   This program is free software; you can redistribute it and/or
     11 *   modify it under the terms of the GNU General Public License
     12 *   as published by the Free Software Foundation; either version 2
     13 *   of the License, or (at your option) any later version.
     14 *
     15 *   This program is distributed in the hope that it will be useful,
     16 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
     17 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     18 *   GNU General Public License for more details.
     19 *
     20 *   You should have received a copy of the GNU General Public License
     21 *   along with this program; if not, write to the Free Software
     22 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
     23 *
     24 *   Author:
     25 *      Oliver Scheuss, (C) 2008
     26 *   Co-authors:
     27 *      ...
     28 *
     29 */
     30
     31
    132#include "Welcome.h"
    2 #include "Packet.h"
     33#include "network/Host.h"
    334#include <assert.h>
    435
     
    1243 
    1344  Welcome::Welcome( unsigned int clientID, unsigned int shipID )
    14  : PacketContent()
     45 : Packet()
    1546{
    1647  flags_ = flags_ | PACKET_FLAGS_CLASSID;
     
    2455
    2556Welcome::Welcome( unsigned char *data, int clientID )
    26   : PacketContent(data, clientID)
     57  : Packet(data, clientID)
    2758{
    2859}
     
    4475  clientID = *(unsigned int *)&data_[ _CLIENTID ];
    4576  shipID = *(unsigned int *)&data_[ _SHIPID ];
     77  Host::setClientID(clientID);
     78  Host::setShipID(shipID);
     79  delete this;
    4680  return true;
    4781}
Note: See TracChangeset for help on using the changeset viewer.