Changeset 1781 for code/trunk/src/orxonox
- Timestamp:
- Sep 15, 2008, 12:42:18 AM (16 years ago)
- Location:
- code/trunk/src/orxonox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/OrxonoxStableHeaders.h
r1755 r1781 37 37 #include "util/OrxonoxPlatform.h" 38 38 39 #if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC && !defined(ORXONOX_DISABLE_PCH) 39 #if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC && !defined(ORXONOX_DISABLE_PCH) && 0 40 40 41 41 // including std headers here is useless since they're already precompiled … … 55 55 #include "tinyxml/tinyxml.h" 56 56 57 //Get around Windows hackery (windows.h is included by Ogre) 58 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32 59 # ifdef max 60 # undef max 61 # endif 62 # ifdef min 63 # undef min 64 # endif 65 #endif 57 66 58 67 //----------- Our files ---------- -
code/trunk/src/orxonox/objects/SpaceShip.cc
r1772 r1781 169 169 } 170 170 171 bool SpaceShip::create(){ 172 if(!myShip_){ 173 if(network::Host::running()) 174 // COUT(3) << "this id: " << this->objectID << " myShipID: " << network::Host::getShipID() << std::endl; 175 if(network::Host::running() && objectID == network::Host::getShipID()){ 176 if(!network::Host::isServer()) 177 setObjectMode(0x3); 178 myShip_=true; 171 bool SpaceShip::create() 172 { 173 if (!myShip_) 174 { 175 if (network::Host::running()) 176 //COUT(3) << "this id: " << this->objectID << " myShipID: " << network::Host::getShipID() << std::endl; 177 if (network::Host::running() && objectID == network::Host::getShipID()) 178 { 179 if (!network::Host::isServer()) 180 setObjectMode(0x3); 181 myShip_ = true; 182 } 179 183 } 180 184 else 181 this->setRadarObjectColour(this->getProjectileColour()); 182 } 183 assert(Model::create()); 184 this->init(); 185 return true; 186 } 187 188 void SpaceShip::registerAllVariables(){ 189 registerVar( &camName_, camName_.length()+1, network::STRING, 0x1 ); 190 registerVar( &maxSpeed_, sizeof(maxSpeed_), network::DATA, 0x1); 191 registerVar( &maxSideAndBackSpeed_, sizeof(maxSideAndBackSpeed_), network::DATA, 0x1); 192 registerVar( &maxRotation_, sizeof(maxRotation_), network::DATA, 0x1); 193 registerVar( &translationAcceleration_, sizeof(translationAcceleration_), network::DATA, 0x1); 194 registerVar( &rotationAcceleration_, sizeof(rotationAcceleration_), network::DATA, 0x1); 195 registerVar( &rotationAccelerationRadian_, sizeof(rotationAccelerationRadian_), network::DATA, 0x1); 196 registerVar( &translationDamping_, sizeof(translationDamping_), network::DATA, 0x1); 197 registerVar( &rotationDamping_, sizeof(rotationDamping_), network::DATA, 0x1); 198 registerVar( &rotationDampingRadian_, sizeof(rotationDampingRadian_), network::DATA, 0x1); 199 185 this->setRadarObjectColour(this->getProjectileColour()); 186 assert(Model::create()); 187 this->init(); 188 return true; 189 } 190 191 void SpaceShip::registerAllVariables() 192 { 193 registerVar( &camName_, camName_.length()+1, network::STRING, 0x1 ); 194 registerVar( &maxSpeed_, sizeof(maxSpeed_), network::DATA, 0x1); 195 registerVar( &maxSideAndBackSpeed_, sizeof(maxSideAndBackSpeed_), network::DATA, 0x1); 196 registerVar( &maxRotation_, sizeof(maxRotation_), network::DATA, 0x1); 197 registerVar( &translationAcceleration_, sizeof(translationAcceleration_), network::DATA, 0x1); 198 registerVar( &rotationAcceleration_, sizeof(rotationAcceleration_), network::DATA, 0x1); 199 registerVar( &rotationAccelerationRadian_, sizeof(rotationAccelerationRadian_), network::DATA, 0x1); 200 registerVar( &translationDamping_, sizeof(translationDamping_), network::DATA, 0x1); 201 registerVar( &rotationDamping_, sizeof(rotationDamping_), network::DATA, 0x1); 202 registerVar( &rotationDampingRadian_, sizeof(rotationDampingRadian_), network::DATA, 0x1); 200 203 } 201 204
Note: See TracChangeset
for help on using the changeset viewer.