Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 26, 2008, 12:59:48 AM (16 years ago)
Author:
scheusso
Message:

Fix in Projectiles (network fix)
different improvements in synchronisable and gamestates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/orxonox/objects/SpaceShip.cc

    r1772 r1834  
    7878      for(it = ObjectList<SpaceShip>::begin(); it; ++it){
    7979        assert(it->isA(Class(SpaceShip)));
    80         if( (it)->myShip_ || (network::Host::running() && network::Host::getShipID()==(it)->objectID) ){
     80        if( (it)->myShip_ || (network::Host::running() && network::Host::getShipID()==(it)->getObjectID()) ){
    8181//        COUT(1) << "^^^^^^^^^^ myShip_:" << *it << " classname: " << (*it)->getIdentifier()->getName() << " objectid: " << (*it)->objectID << std::endl;
    8282          return *it;
     
    173173        if(network::Host::running())
    174174//          COUT(3) << "this id: " << this->objectID << " myShipID: " << network::Host::getShipID() << std::endl;
    175         if(network::Host::running() && objectID == network::Host::getShipID()){
     175        if(network::Host::running() && getObjectID() == network::Host::getShipID()){
    176176          if(!network::Host::isServer())
    177177            setObjectMode(0x3);
     
    375375        if(this->isExactlyA(Class(SpaceShip))){
    376376          getFocus();
    377           COUT(3) << "getting focus for obj id: " << objectID << std::endl;
     377          COUT(3) << "getting focus for obj id: " << getObjectID() << std::endl;
    378378        }else
    379           COUT(3) << "not getting focus (not exactly spaceship) for obj id: " << objectID << std::endl;
     379          COUT(3) << "not getting focus (not exactly spaceship) for obj id: " << getObjectID() << std::endl;
    380380      }else
    381         COUT(3) << "not getting focus (not my ship) for obj id: " << objectID << std::endl;
     381        COUT(3) << "not getting focus (not my ship) for obj id: " << getObjectID() << std::endl;
    382382    }
    383383
     
    475475            projectile->setColour(this->getProjectileColour());
    476476            projectile->create();
    477             if (projectile->classID == 0)
     477            if (projectile->getClassID() == 0)
    478478            {
    479479              COUT(3) << "generated projectile with classid 0" <<  std::endl; // TODO: remove this output
     
    570570        }
    571571
    572         COUT(5) << "steering our ship: " << objectID << std::endl;
     572        COUT(5) << "steering our ship: " << getObjectID() << std::endl;
    573573        this->acceleration_.x = 0;
    574574        this->acceleration_.y = 0;
Note: See TracChangeset for help on using the changeset viewer.