Changeset 11730 for code/branches/Presentation_HS17_merge
- Timestamp:
- Feb 11, 2018, 4:52:54 PM (7 years ago)
- Location:
- code/branches/Presentation_HS17_merge
- Files:
-
- 7 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Presentation_HS17_merge
-
code/branches/Presentation_HS17_merge/src/modules/CMakeLists.txt
r11725 r11730 26 26 ################ Sub Directories ################ 27 27 28 ADD_SUBDIRECTORY(asteroidmining) 28 29 ADD_SUBDIRECTORY(dialogue) 29 30 ADD_SUBDIRECTORY(designtools) -
code/branches/Presentation_HS17_merge/src/modules/pickup/Pickup.h
r11071 r11730 145 145 virtual void changedPickedUp(void) override; //!< Should be called when the pickup has transited from picked up to dropped or the other way around. 146 146 147 148 virtual bool createSpawner(void) override; //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable. 149 150 147 151 protected: 148 virtual bool createSpawner(void) override; //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.149 152 150 153 /** -
code/branches/Presentation_HS17_merge/src/modules/pickup/PickupSpawner.cc
r11707 r11730 158 158 for(Pawn* pawn : ObjectList<Pawn>()) 159 159 { 160 if(!(pawn->doesAcceptPickups())){continue;} // skip those pawns, e.g. AsteroidMinables. 161 160 162 Vector3 distance = pawn->getWorldPosition() - this->getWorldPosition(); 161 163 PickupCarrier* carrier = static_cast<PickupCarrier*>(pawn); -
code/branches/Presentation_HS17_merge/src/modules/pickup/PickupSpawner.h
r11071 r11730 114 114 {return this->pickupTemplate_; } 115 115 116 117 void setPickupTemplateName(const std::string& name); 118 void setMaxSpawnedItems(int items); //!< Sets the maximum number of spawned items. 119 120 inline void setRespawnTime(float time) 121 { this->respawnTime_ = time; } 122 123 116 124 private: 117 125 void initialize(void); … … 141 149 @param time New time after which this gets re-actived. 142 150 */ 143 inline void setRespawnTime(float time)144 { this->respawnTime_ = time; }145 151 146 void setMaxSpawnedItems(int items); //!< Sets the maximum number of spawned items.147 152 148 void setPickupTemplateName(const std::string& name); 153 149 154 void setPickupTemplate(Template* temp); 150 155 -
code/branches/Presentation_HS17_merge/src/orxonox/worldentities/pawns/Pawn.cc
r11176 r11730 84 84 // set damage multiplier to default value 1, meaning nominal damage 85 85 this->damageMultiplier_ = 1; 86 this->acceptsPickups_ = true; 86 87 87 88 this->spawnparticleduration_ = 3.0f; -
code/branches/Presentation_HS17_merge/src/orxonox/worldentities/pawns/Pawn.h
r11176 r11730 199 199 { return this->damageMultiplier_; } 200 200 201 // Some pawns can-t harvest pickups (e.g. AsteroidMinables). Checked in PickupSpawner. 202 inline void setPickupAcceptance(bool b) 203 { this->acceptsPickups_ = b; } 204 inline bool doesAcceptPickups() 205 { return this->acceptsPickups_;} 201 206 202 207 virtual void startLocalHumanControl() override; … … 218 223 { return this->weaponSystem_; } 219 224 220 static void consoleCommand_debugDrawWeapons(bool bDraw); 225 static void consoleCommand_debugDrawWeapons(bool bDraw); 226 227 221 228 222 229 protected: … … 256 263 257 264 float damageMultiplier_; ///< Used by the Damage Boost Pickup. 265 bool acceptsPickups_; // Added for the asteroidMinable class, avoid that they attempt to grab the resources 258 266 259 267 WeakPtr<Pawn> lastHitOriginator_;
Note: See TracChangeset
for help on using the changeset viewer.