Changeset 9348 for code/trunk/src/orxonox/worldentities
- Timestamp:
- Aug 30, 2012, 11:08:17 PM (12 years ago)
- Location:
- code/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:ignore
-
old new 1 .project 1 2 build 2 3 codeblocks 4 dependencies 3 5 vs 4 dependencies
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
code/trunk/src/orxonox/worldentities/ControllableEntity.cc
r9016 r9348 87 87 this->setPriority( Priority::VeryHigh ); 88 88 this->registerVariables(); 89 89 this->team_ = -1; 90 90 } 91 91 … … 266 266 this->cameraPositionRootNode_->_update(true, false); // update the camera node because otherwise the camera will drag back in position which looks strange 267 267 268 NewHumanController* controller = dynamic_cast<NewHumanController*>(this->getController());268 NewHumanController* controller = orxonox_cast<NewHumanController*>(this->getController()); 269 269 if (controller) 270 270 controller->centerCursor(); -
code/trunk/src/orxonox/worldentities/ControllableEntity.h
r9255 r9348 164 164 void setTargetInternal( uint32_t targetID ); 165 165 166 167 168 169 166 inline void setTeam(int team) 167 { this->team_ = team; } 168 inline int getTeam() const 169 { return this->team_; } 170 170 171 171 protected: … … 243 243 WeakPtr<WorldEntity> target_; 244 244 245 245 int team_ ; //<! teamnumber 246 246 }; 247 247 } -
code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
r9257 r9348 75 75 this->lastHitOriginator_ = 0; 76 76 77 // set damage multiplier to default value 1, meaning nominal damage 78 this->damageMultiplier_ = 1; 79 77 80 this->spawnparticleduration_ = 3.0f; 78 81 … … 228 231 void Pawn::damage(float damage, float healthdamage, float shielddamage, Pawn* originator) 229 232 { 233 // Applies multiplier given by the DamageBoost Pickup. 234 if (originator) 235 damage *= originator->getDamageMultiplier(); 236 230 237 if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator)) 231 238 { -
code/trunk/src/orxonox/worldentities/pawns/Pawn.h
r9254 r9348 144 144 virtual void addedWeaponPack(WeaponPack* wPack) {} 145 145 146 inline const WorldEntity* getWorldEntity() const147 { return const_cast<Pawn*>(this); }148 149 146 inline void setSpawnParticleSource(const std::string& source) 150 147 { this->spawnparticlesource_ = source; } … … 162 159 { return this->numexplosionchunks_; } 163 160 161 // These are used with the Damage Boost Pickup to use the damage multiplier. 162 inline void setDamageMultiplier(float multiplier) 163 { this->damageMultiplier_ = multiplier; } 164 inline float getDamageMultiplier() const 165 { return this->damageMultiplier_; } 166 167 164 168 virtual void startLocalHumanControl(); 165 169 … … 203 207 float maxShieldHealth_; 204 208 float initialShieldHealth_; 205 float shieldAbsorption_; // Has to be between 0 and 1209 float shieldAbsorption_; ///< Has to be between 0 and 1 206 210 float reloadRate_; 207 211 float reloadWaitTime_; 208 212 float reloadWaitCountdown_; 213 214 float damageMultiplier_; ///< Used by the Damage Boost Pickup. 209 215 210 216 WeakPtr<Pawn> lastHitOriginator_; -
code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc
r8892 r9348 133 133 { 134 134 SetConfigValue(bInvertYAxis_, false).description("Set this to true for joystick-like mouse behaviour (mouse up = ship down)."); 135 135 136 136 SetConfigValueExternal(bEnableMotionBlur_, "GraphicsSettings", "enableMotionBlur", true) 137 137 .description("Enable or disable the motion blur effect when moving very fast") … … 503 503 void SpaceShip::resetCamera() 504 504 { 505 506 505 if(this->hasLocalController() && this->hasHumanController()) 506 { 507 507 Camera *camera = this->getCamera(); 508 508 if (camera == 0) … … 514 514 camera->setPosition(this->cameraOriginalPosition_); 515 515 camera->setOrientation(this->cameraOriginalOrientation_); 516 516 } 517 517 } 518 518
Note: See TracChangeset
for help on using the changeset viewer.