Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1732


Ignore:
Timestamp:
Sep 7, 2008, 4:33:09 PM (16 years ago)
Author:
scheusso
Message:

another fixed

Location:
code/branches/network/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/network/Client.h

    r1711 r1732  
    8080    unsigned int shipID(){return shipID_;}
    8181    int playerID(){return clientID_;}
    82     static void setShipID( unsigned int shipID){ dynamic_cast<Client *>(instance_)->shipID_=shipID; }
     82    //static void setShipID( unsigned int shipID){ dynamic_cast<Client *>(instance_)->shipID_=shipID; }
    8383    static void setClientID( unsigned int clientID){ dynamic_cast<Client *>(instance_)->clientID_=clientID; }
    8484   
  • code/branches/network/src/network/Host.cc

    r1711 r1732  
    4848}
    4949
    50 unsigned int Host::getShipID(){
    51   if(!instance_)
    52     return 0;
    53   return instance_->shipID();
    54 }
     50// unsigned int Host::getShipID(){
     51//   if(!instance_)
     52//     assert(0);
     53//   return instance_->shipID();
     54// }
    5555
    5656}//namespace network
  • code/branches/network/src/network/Host.h

    r1711 r1732  
    6161//     static bool receiveChat(packet::Chat *message, unsigned int clientID);
    6262    static int getPlayerID();
    63     static unsigned int getShipID();
     63    static unsigned int getShipID(){return instance_->shipID_;}
    6464    static void setClientID(unsigned int id){ instance_->clientID_ = id; }
    6565    static void setShipID(unsigned int id){ instance_->shipID_ = id; }
  • code/branches/network/src/network/packet/Welcome.cc

    r1713 r1732  
    3232#include "Welcome.h"
    3333#include "network/Host.h"
     34#include "core/CoreIncludes.h"
    3435#include <assert.h>
    3536
     
    7778  Host::setClientID(clientID);
    7879  Host::setShipID(shipID);
     80  COUT(3) << "Welcome set clientId: " << clientID << " shipID: " << shipID << std::endl;
    7981  delete this;
    8082  return true;
  • code/branches/network/src/orxonox/objects/Ambient.h

    r1505 r1732  
    3838namespace orxonox
    3939{
    40     class _OrxonoxExport Ambient : public BaseObject, network::Synchronisable
     40    class _OrxonoxExport Ambient : public BaseObject, public network::Synchronisable
    4141    {
    4242        public:
  • code/branches/network/src/orxonox/objects/SpaceShip.cc

    r1730 r1732  
    7676          return *it;
    7777      }
    78       return NULL;
     78      return 0;
    7979    }
    8080
     
    158158    bool SpaceShip::create(){
    159159      if(!myShip_){
     160        if(network::Host::running())
     161          COUT(3) << "this id: " << this->objectID << " myShipID: " << network::Host::getShipID() << std::endl;
    160162        if(network::Host::running() && objectID == network::Host::getShipID())
    161163          myShip_=true;
     
    163165          HUD::getSingleton().addRadarObject(this, this->getProjectileColour());
    164166      }
    165       if(Model::create())
    166         this->init();
    167       else
    168         return false;
     167      assert(Model::create());
     168      this->init();
    169169      return true;
    170170    }
     
    287287
    288288    void SpaceShip::getFocus(){
    289       COUT(4) << "requesting focus" << std::endl;
     289      COUT(3) << "requesting focus" << std::endl;
    290290      //if(!network::Host::running() || network::Host::getShipID()==objectID)
    291291      if(myShip_)
     
    301301//       COUT(4) << "begin camera creation" << std::endl;
    302302      this->camNode_ = this->getNode()->createChildSceneNode(camName_);
    303       COUT(4) << "position: (this)" << this->getNode()->getPosition() << std::endl;
     303      COUT(3) << "position: (this)" << this->getNode()->getPosition() << std::endl;
    304304      this->camNode_->setPosition(Vector3(-25,0,5));
    305305//      Quaternion q1 = Quaternion(Radian(Degree(90)),Vector3(0,-1,0));
Note: See TracChangeset for help on using the changeset viewer.