Changeset 2864 for code/branches/pickups/src/orxonox
- Timestamp:
- Mar 30, 2009, 2:27:26 PM (16 years ago)
- Location:
- code/branches/pickups/src/orxonox/objects
- Files:
-
- 15 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickups/src/orxonox/objects/pickup/CMakeLists.txt
r2831 r2864 1 1 ADD_SOURCE_FILES(ORXONOX_SRC_FILES 2 2 BaseItem.cc 3 EquipmentItem.cc 4 ModifierPickup.cc 5 PassiveItem.cc 6 PickupCollection.cc 7 PickupSpawner.cc 8 UsableItem.cc 3 9 ) -
code/branches/pickups/src/orxonox/objects/weaponSystem/projectiles/Projectile.cc
r2809 r2864 124 124 125 125 Pawn* victim = dynamic_cast<Pawn*>(otherObject); 126 127 float dmg = this->damage_; 128 if (this->owner_) 129 dmg = this->owner_->getPickups().processModifiers(ModifierType::Damage, dmg, false); 130 126 131 if (victim) 127 victim->damage( this->damage_, this->owner_);132 victim->damage(dmg, this->owner_); 128 133 } 129 134 return false; -
code/branches/pickups/src/orxonox/objects/worldentities/pawns/Pawn.cc
r2831 r2864 33 33 #include "core/CoreIncludes.h" 34 34 #include "core/XMLPort.h" 35 #include "util/Exception.h"36 35 #include "util/Math.h" 37 36 #include "PawnManager.h" … … 62 61 this->spawnparticleduration_ = 3.0f; 63 62 63 this->getPickups().setOwner(this); 64 64 65 if (Core::isMaster()) 65 66 { … … 204 205 this->setDestroyWhenPlayerLeft(false); 205 206 207 this->dropItems(); 208 206 209 if (this->getGametype()) 207 210 this->getGametype()->pawnKilled(this, this->lastHitOriginator_); … … 266 269 void Pawn::dropItems() 267 270 { 268 ThrowException(NotImplemented, "Pickupsystem not implemented yet.");271 this->getPickups().clear(); 269 272 } 270 273 -
code/branches/pickups/src/orxonox/objects/worldentities/pawns/Pawn.h
r2831 r2864 34 34 #include "objects/RadarViewable.h" 35 35 #include "objects/weaponSystem/WeaponSystem.h" 36 #include "objects/pickup/PickupCollection.h" 36 37 37 38 namespace orxonox … … 107 108 108 109 virtual void dropItems(); 110 inline PickupCollection& getPickups() 111 { return this->pickups_; } 109 112 110 113 protected: … … 115 118 bool bAlive_; 116 119 120 PickupCollection pickups_; 117 121 118 122 float health_;
Note: See TracChangeset
for help on using the changeset viewer.