Changeset 2501 for code/branches/presentation/src/orxonox/objects
- Timestamp:
- Dec 17, 2008, 9:11:12 AM (16 years ago)
- Location:
- code/branches/presentation/src/orxonox/objects
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/orxonox/objects/GlobalShader.cc
r2485 r2501 45 45 if (!this->getScene()) 46 46 ThrowException(AbortLoading, "Can't create GlobalShader, no scene given."); 47 if (!this->getScene()->getSceneManager())48 ThrowException(AbortLoading, "Can't create GlobalShader, no scene manager given.");47 // if (!this->getScene()->getSceneManager()) 48 // ThrowException(AbortLoading, "Can't create GlobalShader, no scene manager given."); 49 49 50 this->shader_.setSceneManager(this->getScene()->getSceneManager()); 50 if (this->getScene()->getSceneManager()) 51 this->shader_.setSceneManager(this->getScene()->getSceneManager()); 51 52 52 53 this->registerVariables(); -
code/branches/presentation/src/orxonox/objects/gametypes/Gametype.cc
r2495 r2501 69 69 this->addBots(this->numberOfBots_); 70 70 71 setConfigValues();72 73 71 // load the corresponding score board 74 72 if (Core::showsGraphics() && this->scoreboardTemplate_ != "") -
code/branches/presentation/src/orxonox/objects/weaponSystem/Weapon.cc
r2493 r2501 50 50 this->magazineLoadingTime_ = 0; 51 51 this->bReloading_ = false; 52 53 this->setObjectMode(0x0); 52 54 } 53 55 -
code/branches/presentation/src/orxonox/objects/weaponSystem/projectiles/Projectile.cc
r2497 r2501 54 54 55 55 // Get notification about collisions 56 this->enableCollisionCallback();57 56 58 this->setCollisionType(Kinematic); 57 if (Core::isMaster()) 58 { 59 this->enableCollisionCallback(); 59 60 60 SphereCollisionShape* shape = new SphereCollisionShape(this); 61 shape->setRadius(10); 62 this->attachCollisionShape(shape); 61 this->setCollisionType(Kinematic); 63 62 64 if(Core::isMaster()) 65 this->destroyTimer_.setTimer(this->lifetime_, false, this, createExecutor(createFunctor(&Projectile::destroyObject))); 63 SphereCollisionShape* shape = new SphereCollisionShape(this); 64 shape->setRadius(10); 65 this->attachCollisionShape(shape); 66 67 this->destroyTimer_.setTimer(this->lifetime_, false, this, createExecutor(createFunctor(&Projectile::destroyObject))); 68 } 66 69 } 67 70 -
code/branches/presentation/src/orxonox/objects/worldentities/WorldEntity.cc
r2497 r2501 545 545 if (type != None && this->collisionType_ == None) 546 546 { 547 /* 547 548 // Check whether there was some scaling applied. 548 549 if (!this->node_->getScale().positionEquals(Vector3(1, 1, 1), 0.001)) … … 551 552 return; 552 553 } 553 554 */ 554 555 // Create new rigid body 555 556 btRigidBody::btRigidBodyConstructionInfo bodyConstructionInfo(0, this, this->collisionShape_->getCollisionShape()); -
code/branches/presentation/src/orxonox/objects/worldentities/pawns/Pawn.cc
r2500 r2501 49 49 50 50 PawnManager::touch(); 51 this->getPickUp().setPlayer(this);52 51 this->bAlive_ = true; 53 52 this->fire_ = 0x0; 53 this->firehack_ = 0x0; 54 54 55 55 this->health_ = 0; … … 60 60 61 61 this->spawnparticleduration_ = 3.0f; 62 63 this->getPickUp().setPlayer(this); 62 64 63 65 if (Core::isMaster()) … … 108 110 registerVariable(this->health_, variableDirection::toclient); 109 111 registerVariable(this->initialHealth_, variableDirection::toclient); 110 registerVariable(this->fire_, variableDirection::to client);112 registerVariable(this->fire_, variableDirection::toserver); 111 113 } 112 114 … … 124 126 this->weaponSystem_->fire(WeaponMode::altFire2); 125 127 } 126 this->fire_ = 0x0; 128 this->fire_ = this->firehack_; 129 this->firehack_ = 0x0; 127 130 128 131 if (this->health_ <= 0) … … 225 228 void Pawn::fire(WeaponMode::Enum fireMode) 226 229 { 227 this->fire _ |= fireMode;230 this->firehack_ |= fireMode; 228 231 } 229 232 -
code/branches/presentation/src/orxonox/objects/worldentities/pawns/Pawn.h
r2500 r2501 116 116 ShipEquipment pickUp; 117 117 bool bAlive_; 118 118 119 119 120 120 float health_; … … 126 126 WeaponSystem* weaponSystem_; 127 127 unsigned int fire_; 128 unsigned int firehack_; 128 129 129 130 std::string spawnparticlesource_;
Note: See TracChangeset
for help on using the changeset viewer.