Changeset 9277 for code/branches
- Timestamp:
- Jun 4, 2012, 9:40:54 PM (12 years ago)
- Location:
- code/branches/presentation2012merge/src/orxonox/worldentities/pawns
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2012merge/src/orxonox/worldentities/pawns/Pawn.cc
r9272 r9277 231 231 void Pawn::damage(float damage, float healthdamage, float shielddamage, Pawn* originator) 232 232 { 233 //Applies multiplier given by the DamageBoost Pickup. 234 Pawn *test = dynamic_cast<Pawn *>(originator); 235 if( test != NULL ) 236 { 237 damage *= originator->getDamageMultiplier(); 238 } 233 // Applies multiplier given by the DamageBoost Pickup. 234 damage *= originator->getDamageMultiplier(); 239 235 240 236 if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator)) -
code/branches/presentation2012merge/src/orxonox/worldentities/pawns/Pawn.h
r9269 r9277 165 165 inline void setDamageMultiplier(float multiplier) 166 166 { this->damageMultiplier_ = multiplier; } 167 inline float getDamageMultiplier() 167 inline float getDamageMultiplier() const 168 168 { return this->damageMultiplier_; } 169 169 … … 210 210 float maxShieldHealth_; 211 211 float initialShieldHealth_; 212 float shieldAbsorption_; // Has to be between 0 and 1212 float shieldAbsorption_; ///< Has to be between 0 and 1 213 213 float reloadRate_; 214 214 float reloadWaitTime_; 215 215 float reloadWaitCountdown_; 216 216 217 // Modifier 218 float damageMultiplier_; // Used by the Damage Boost Pickup. 217 float damageMultiplier_; ///< Used by the Damage Boost Pickup. 219 218 220 219 WeakPtr<Pawn> lastHitOriginator_;
Note: See TracChangeset
for help on using the changeset viewer.