Changeset 9195 for code/branches/presentation2012/src
- Timestamp:
- May 18, 2012, 2:58:33 PM (13 years ago)
- Location:
- code/branches/presentation2012
- Files:
-
- 6 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2012
- Property svn:mergeinfo changed
/code/branches/pickup2012 (added) merged: 9029,9099,9118-9119,9155,9184
- Property svn:mergeinfo changed
-
code/branches/presentation2012/src/modules/pickup/PickupPrereqs.h
r8706 r9195 86 86 class ShieldPickup; 87 87 class ShrinkPickup; 88 88 class DamageBoostPickup; 89 89 } 90 90 -
code/branches/presentation2012/src/modules/pickup/items/CMakeLists.txt
r8706 r9195 7 7 ShieldPickup.cc 8 8 ShrinkPickup.cc 9 DamageBoostPickup.cc 9 10 ) -
code/branches/presentation2012/src/modules/pickup/items/SpeedPickup.h
r8727 r9195 112 112 private: 113 113 void initialize(void); //!< Initializes the member variables. 114 SpaceShip* carrierToSpaceShipHelper(void); //!< Helper to transform the PickupCarrier to a SpaceS Hip, and throw an error message if the conversion fails.114 SpaceShip* carrierToSpaceShipHelper(void); //!< Helper to transform the PickupCarrier to a SpaceShip, and throw an error message if the conversion fails. 115 115 116 116 Timer durationTimer_; //!< Timer. -
code/branches/presentation2012/src/orxonox/worldentities/pawns/Pawn.cc
r9016 r9195 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 //Applies multiplier given by the DamageBoost Pickup. 234 Pawn *test = dynamic_cast<Pawn *>(originator); 235 if( test != NULL ) 236 { 237 damage *= originator->getDamageMultiplier(); 238 } 239 240 if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator)) 231 241 { 232 242 if (shielddamage >= this->getShieldHealth()) -
code/branches/presentation2012/src/orxonox/worldentities/pawns/Pawn.h
r9016 r9195 162 162 { return this->numexplosionchunks_; } 163 163 164 // These are used with the Damage Boost Pickup to use the damage multiplier. 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 // Modifier 218 float damageMultiplier_; // Used by the Damage Boost Pickup. 219 210 220 WeakPtr<Pawn> lastHitOriginator_; 211 221
Note: See TracChangeset
for help on using the changeset viewer.