Changeset 9099 for code/branches/pickup2012/src/orxonox
- Timestamp:
- Apr 20, 2012, 4:06:09 PM (13 years ago)
- Location:
- code/branches/pickup2012/src/orxonox/worldentities/pawns
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup2012/src/orxonox/worldentities/pawns/Pawn.cc
r9016 r9099 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 { 230 if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator)) 233 // apply multiplier 234 damage *= originator->getDamageMultiplier(); 235 236 if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator)) 231 237 { 232 238 if (shielddamage >= this->getShieldHealth()) -
code/branches/pickup2012/src/orxonox/worldentities/pawns/Pawn.h
r9016 r9099 162 162 { return this->numexplosionchunks_; } 163 163 164 // not that beautiful yet 165 inline void setDamageMultiplier(float multiplier) 166 { this->damageMultiplier_ = multiplier; } 167 inline float getDamageMultiplier() 168 { return this->damageMultiplier_; } 169 170 164 171 virtual void startLocalHumanControl(); 165 172 … … 208 215 float reloadWaitCountdown_; 209 216 217 // modifiers 218 float damageMultiplier_; 219 210 220 WeakPtr<Pawn> lastHitOriginator_; 211 221
Note: See TracChangeset
for help on using the changeset viewer.