Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 15, 2008, 2:55:13 PM (17 years ago)
Author:
scheusso
Message:

spaceship fix

Location:
code/branches/merge/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/merge/src/network/Client.cc

    r1264 r1284  
    234234      if(gs){
    235235        COUT(4) << "client tick: sending gs " << gs << std::endl;
    236         if(client_connection.addPacket(pck_gen.gstate(gs)))
     236        ENetPacket *packet = pck_gen.gstate(gs);
     237        if( packet == NULL || !client_connection.addPacket(packet))
    237238          COUT(3) << "Problem adding partial gamestate to queue" << std::endl;
    238239        // now delete it to save memory
  • code/branches/merge/src/orxonox/objects/SpaceShip.cc

    r1275 r1284  
    116116        if (this->tt_)
    117117            delete this->tt_;
     118        if(setMouseEventCallback_)
     119          InputManager::removeMouseHandler("SpaceShip");
    118120    }
    119121
     
    142144    void SpaceShip::init()
    143145    {
    144     if ((!network::Client::getSingleton() || network::Client::getSingleton()->getShipID()==objectID ))
     146    if ((server_ || ( network::Client::getSingleton() && network::Client::getSingleton()->getShipID()==objectID ) ))
    145147    {
    146148          if (!setMouseEventCallback_)
Note: See TracChangeset for help on using the changeset viewer.