- Timestamp:
- Jun 30, 2009, 3:14:45 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core4/src/orxonox/objects/pickup/ModifierPickup.cc
r3196 r3257 87 87 if (this->addTo(pawn)) 88 88 { 89 std::map<ModifierType:: Enum, float>::iterator it;89 std::map<ModifierType::Value, float>::iterator it; 90 90 91 91 for (it = this->additiveModifiers_.begin(); it != this->additiveModifiers_.end(); it++) … … 124 124 if (this->removeFrom(pawn)) 125 125 { 126 std::map<ModifierType:: Enum, float>::iterator it;126 std::map<ModifierType::Value, float>::iterator it; 127 127 128 128 for (it = this->additiveModifiers_.begin(); it != this->additiveModifiers_.end(); it++) … … 158 158 @return Returns the additive modifier for type (or 0 if not exists). 159 159 */ 160 float ModifierPickup::getAdditiveModifier(ModifierType:: Enumtype) const161 { 162 std::map<ModifierType:: Enum, float>::const_iterator it = this->additiveModifiers_.find(type);160 float ModifierPickup::getAdditiveModifier(ModifierType::Value type) const 161 { 162 std::map<ModifierType::Value, float>::const_iterator it = this->additiveModifiers_.find(type); 163 163 if (it != this->additiveModifiers_.end()) 164 164 return (*it).second; … … 171 171 @return Returns the multiplicative modifier for type (or 1 if not exists). 172 172 */ 173 float ModifierPickup::getMultiplicativeModifier(ModifierType:: Enumtype) const174 { 175 std::map<ModifierType:: Enum, float>::const_iterator it = this->multiplicativeModifiers_.find(type);173 float ModifierPickup::getMultiplicativeModifier(ModifierType::Value type) const 174 { 175 std::map<ModifierType::Value, float>::const_iterator it = this->multiplicativeModifiers_.find(type); 176 176 if (it != this->multiplicativeModifiers_.end()) 177 177 return (*it).second; … … 184 184 @param value The new additive modifier for type. 185 185 */ 186 void ModifierPickup::setAdditiveModifier(ModifierType:: Enumtype, float value)186 void ModifierPickup::setAdditiveModifier(ModifierType::Value type, float value) 187 187 { 188 188 if (this->additiveModifiers_.find(type) == this->additiveModifiers_.end()) 189 this->additiveModifiers_.insert( std::pair<ModifierType:: Enum, float>(type, value) );189 this->additiveModifiers_.insert( std::pair<ModifierType::Value, float>(type, value) ); 190 190 else 191 191 this->additiveModifiers_[type] = value; … … 196 196 @param value The new multiplicative modifier for type. 197 197 */ 198 void ModifierPickup::setMultiplicativeModifier(ModifierType:: Enumtype, float value)198 void ModifierPickup::setMultiplicativeModifier(ModifierType::Value type, float value) 199 199 { 200 200 if (this->multiplicativeModifiers_.find(type) == this->multiplicativeModifiers_.end()) 201 this->multiplicativeModifiers_.insert( std::pair<ModifierType:: Enum, float>(type, value) );201 this->multiplicativeModifiers_.insert( std::pair<ModifierType::Value, float>(type, value) ); 202 202 else 203 203 this->multiplicativeModifiers_[type] = value;
Note: See TracChangeset
for help on using the changeset viewer.