Changeset 1360 for code/trunk/src/orxonox
- Timestamp:
- May 22, 2008, 2:02:06 PM (17 years ago)
- Location:
- code/trunk/src/orxonox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/OrxonoxPlatform.h
r1293 r1360 196 196 //typedef unsigned short uint16; 197 197 //typedef unsigned char uint8; 198 // proper approach 198 199 199 200 #ifdef ORXONOX_DOUBLE_PRECISION -
code/trunk/src/orxonox/objects/Projectile.cc
r1293 r1360 63 63 64 64 this->destroyTimer_.setTimer(this->lifetime_, false, this, createExecutor(createFunctor(&Projectile::destroyObject))); 65 this->classID = this->getIdentifier()->getNetworkID(); // TODO: remove this hack 66 // COUT(3) << this->classID << std::endl; 65 67 } 66 68 -
code/trunk/src/orxonox/objects/SpaceShip.cc
r1349 r1360 62 62 SpaceShip* SpaceShip::instance_s; 63 63 64 SpaceShip *SpaceShip::getLocalShip(){ 65 Iterator<SpaceShip> it; 66 for(it = ObjectList<SpaceShip>::start(); it; ++it){ 67 if((it)->server_ || ( network::Client::getSingleton() && network::Client::getSingleton()->getShipID()==it->objectID ) ) 68 return *it; 69 } 70 return NULL; 71 } 72 64 73 SpaceShip::SpaceShip() : 65 74 //testvector_(0,0,0), … … 145 154 void SpaceShip::init() 146 155 { 147 if ((server_ || ( network::Client::getSingleton() && network::Client::getSingleton()->getShipID()==objectID ) )) 148 { 149 if (!setMouseEventCallback_) 150 { 151 InputManager::addMouseHandler(this, "SpaceShip"); 152 setMouseEventCallback_ = true; 153 } 154 } 156 if ((server_ || ( network::Client::getSingleton() && network::Client::getSingleton()->getShipID()==objectID ) )) 157 { 158 if (!setMouseEventCallback_) 159 { 160 InputManager::addMouseHandler(this, "SpaceShip"); 161 //InputManager::enableMouseHandler("SpaceShip"); 162 setMouseEventCallback_ = true; 163 } 164 } 155 165 156 166 // START CREATING THRUSTER … … 394 404 if (this->bLMousePressed_ && this->timeToReload_ <= 0) 395 405 { 406 396 407 Projectile *p = new Projectile(this); 408 397 409 p->setBacksync(true); 398 410 this->timeToReload_ = this->reloadTime_; -
code/trunk/src/orxonox/objects/SpaceShip.h
r1349 r1360 44 44 { 45 45 public: 46 47 static SpaceShip *getLocalShip(); 48 46 49 SpaceShip(); 47 50 ~SpaceShip(); -
code/trunk/src/orxonox/objects/WorldEntity.cc
r1293 r1360 138 138 registerVar( (void*) &(this->getOrientation().z), sizeof(this->getOrientation().z), network::DATA, 0x3); 139 139 // register velocity_ 140 //registerVar( (void*) &(this->getVelocity().x), sizeof(this->getVelocity().x), network::DATA, 0x3);141 //registerVar( (void*) &(this->getVelocity().y), sizeof(this->getVelocity().y), network::DATA, 0x3);142 //registerVar( (void*) &(this->getVelocity().z), sizeof(this->getVelocity().z), network::DATA, 0x3);143 //// register rotationAxis/rate144 //registerVar( (void*) &(this->getRotationRate()), sizeof(this->getRotationRate()), network::DATA, 0x3);145 //registerVar( (void*) &(this->getRotationAxis().x), sizeof(this->getRotationAxis().x), network::DATA, 0x3);146 //registerVar( (void*) &(this->getRotationAxis().y), sizeof(this->getRotationAxis().y), network::DATA, 0x3);147 //registerVar( (void*) &(this->getRotationAxis().z), sizeof(this->getRotationAxis().z), network::DATA, 0x3);140 registerVar( (void*) &(this->getVelocity().x), sizeof(this->getVelocity().x), network::DATA, 0x3); 141 registerVar( (void*) &(this->getVelocity().y), sizeof(this->getVelocity().y), network::DATA, 0x3); 142 registerVar( (void*) &(this->getVelocity().z), sizeof(this->getVelocity().z), network::DATA, 0x3); 143 // register rotationAxis/rate 144 registerVar( (void*) &(this->getRotationRate()), sizeof(this->getRotationRate()), network::DATA, 0x3); 145 registerVar( (void*) &(this->getRotationAxis().x), sizeof(this->getRotationAxis().x), network::DATA, 0x3); 146 registerVar( (void*) &(this->getRotationAxis().y), sizeof(this->getRotationAxis().y), network::DATA, 0x3); 147 registerVar( (void*) &(this->getRotationAxis().z), sizeof(this->getRotationAxis().z), network::DATA, 0x3); 148 148 // register scale of node 149 149 registerVar( (void*) &(this->getScale().x), sizeof(this->getScale().x), network::DATA, 0x3); … … 152 152 //register staticity 153 153 registerVar( (void*) &(this->bStatic_), sizeof(this->bStatic_), network::DATA, 0x3); 154 //register acceleration 155 // register velocity_156 // registerVar( (void*) &(this->getAcceleration().x), sizeof(this->getAcceleration().x), network::DATA, 0x3);157 // registerVar( (void*) &(this->getAcceleration().y), sizeof(this->getAcceleration().y), network::DATA, 0x3);158 // registerVar( (void*) &(this->getAcceleration().z), sizeof(this->getAcceleration().z), network::DATA, 0x3);154 //register acceleration & momentum 155 registerVar( (void*) &(this->getAcceleration().x), sizeof(this->getAcceleration().x), network::DATA, 0x3); 156 registerVar( (void*) &(this->getAcceleration().y), sizeof(this->getAcceleration().y), network::DATA, 0x3); 157 registerVar( (void*) &(this->getAcceleration().z), sizeof(this->getAcceleration().z), network::DATA, 0x3); 158 registerVar( (void*) &(this->getMomentum()), sizeof(this->getMomentum()), network::DATA); 159 159 } 160 160
Note: See TracChangeset
for help on using the changeset viewer.