Changeset 11783 for code/trunk/src/modules/pickup
- Timestamp:
- Feb 20, 2018, 12:14:40 AM (7 years ago)
- Location:
- code/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/modules/pickup/PickupPrereqs.h
r11708 r11783 72 72 class Pickup; 73 73 class PickupCollection; 74 classPickupInventoryContainer;74 struct PickupInventoryContainer; 75 75 class PickupManager; 76 76 class PickupRepresentation; -
code/trunk/src/modules/pickup/PickupSpawner.cc
r11707 r11783 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/trunk/src/modules/pickup/PickupSpawner.h
r11071 r11783 92 92 { return this->triggerDistance_; } 93 93 /** 94 @brief Set the distance in which to trigger. 95 @param value The new distance in which to trigger. 96 */ 97 inline void setTriggerDistance(float value) 98 { this->triggerDistance_ = value; } 99 /** 94 100 @brief Get the time to respawn. 95 101 @returns Returns the time after which this gets re-actived. … … 98 104 { return this->respawnTime_; } 99 105 /** 106 @brief Set the time to respawn. 107 @param time New time after which this gets re-actived. 108 */ 109 inline void setRespawnTime(float time) 110 { this->respawnTime_ = time; } 111 /** 100 112 @brief Get the maximum number of items that will be spawned by this PickupSpawner. 101 113 @return Returns the maximum number of items spawned by this PickupSpawner. … … 103 115 inline int getMaxSpawnedItems(void) const 104 116 { return this->maxSpawnedItems_; } 117 void setMaxSpawnedItems(int items); //!< Sets the maximum number of spawned items. 118 105 119 /** 106 120 @brief Returns the name of the template which is used to create a pickup for this spawner. … … 113 127 inline Template* getPickupTemplate() const 114 128 {return this->pickupTemplate_; } 129 130 void setPickupTemplateName(const std::string& name); 131 void setPickupTemplate(Template* temp); 115 132 116 133 private: … … 130 147 void block(PickupCarrier* carrier, unsigned int time = DEFAULT_BLOCKED_TIME) 131 148 { this->blocked_.insert(std::pair<PickupCarrier*, std::time_t>(carrier, std::time(0)+time)); } 132 133 /**134 @brief Set the distance in which to trigger.135 @param value The new distance in which to trigger.136 */137 inline void setTriggerDistance(float value)138 { this->triggerDistance_ = value; }139 /**140 @brief Set the time to respawn.141 @param time New time after which this gets re-actived.142 */143 inline void setRespawnTime(float time)144 { this->respawnTime_ = time; }145 146 void setMaxSpawnedItems(int items); //!< Sets the maximum number of spawned items.147 148 void setPickupTemplateName(const std::string& name);149 void setPickupTemplate(Template* temp);150 149 151 150 Pickupable* createPickup(void); //!< Creates a new Pickupable.
Note: See TracChangeset
for help on using the changeset viewer.