Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 12, 2009, 11:58:01 PM (15 years ago)
Author:
rgrieder
Message:

Merged most of the core4 revisions back to the trunk except for:

  • orxonox_cast
  • all the radical changes in the input library
Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/objects/pickup/PickupCollection.cc

    r3196 r3280  
    4242{
    4343    typedef std::pair<std::multimap<std::string, BaseItem*>::iterator, std::multimap<std::string, BaseItem*>::iterator> item_range;
    44     typedef std::pair<std::multimap<ModifierType::Enum, float>::iterator, std::multimap<ModifierType::Enum, float>::iterator> modifier_range;
     44    typedef std::pair<std::multimap<ModifierType::Value, float>::iterator, std::multimap<ModifierType::Value, float>::iterator> modifier_range;
    4545
    4646    //! Constructor
     
    200200        @param value Value for the modifier.
    201201    */
    202     void PickupCollection::addAdditiveModifier(ModifierType::Enum type, float value)
    203     {
    204         this->additiveModifiers_.insert( std::pair<ModifierType::Enum, float>(type, value) );
     202    void PickupCollection::addAdditiveModifier(ModifierType::Value type, float value)
     203    {
     204        this->additiveModifiers_.insert( std::pair<ModifierType::Value, float>(type, value) );
    205205    }
    206206    /**
     
    209209        @return Returns the sum of the additive modifiers of the type.
    210210    */
    211     float PickupCollection::getAdditiveModifier(ModifierType::Enum type)
     211    float PickupCollection::getAdditiveModifier(ModifierType::Value type)
    212212    {
    213213        float v = 0.0f;
     
    215215        modifier_range range = this->additiveModifiers_.equal_range(type);
    216216
    217         for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++)
     217        for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++)
    218218        {
    219219            v += (*it).second;
     
    227227        @param value Value which is to be removed.
    228228    */
    229     void PickupCollection::removeAdditiveModifier(ModifierType::Enum type, float value)
     229    void PickupCollection::removeAdditiveModifier(ModifierType::Value type, float value)
    230230    {
    231231        modifier_range range = this->additiveModifiers_.equal_range(type);
    232         for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++)
     232        for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++)
    233233        {
    234234            if ((*it).second == value)
     
    244244        @param value Value for the modifier.
    245245    */
    246     void PickupCollection::addMultiplicativeModifier(ModifierType::Enum type, float value)
    247     {
    248         this->multiplicativeModifiers_.insert( std::pair<ModifierType::Enum, float>(type, value) );
     246    void PickupCollection::addMultiplicativeModifier(ModifierType::Value type, float value)
     247    {
     248        this->multiplicativeModifiers_.insert( std::pair<ModifierType::Value, float>(type, value) );
    249249    }
    250250    /**
     
    253253        @return Returns the product of the multiplicative modifiers of the type.
    254254    */
    255     float PickupCollection::getMultiplicativeModifier(ModifierType::Enum type)
     255    float PickupCollection::getMultiplicativeModifier(ModifierType::Value type)
    256256    {
    257257        float v = 1.0f;
    258258
    259259        modifier_range range = this->multiplicativeModifiers_.equal_range(type);
    260         for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++)
     260        for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++)
    261261        {
    262262            v *= (*it).second;
     
    270270        @param value Value which is to be removed.
    271271    */
    272     void PickupCollection::removeMultiplicativeModifier(ModifierType::Enum type, float value)
     272    void PickupCollection::removeMultiplicativeModifier(ModifierType::Value type, float value)
    273273    {
    274274        modifier_range range = this->multiplicativeModifiers_.equal_range(type);
    275         for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++)
     275        for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++)
    276276        {
    277277            if ((*it).second == value)
     
    289289        @return Returns the value after being processed.
    290290    */
    291     float PickupCollection::processModifiers(ModifierType::Enum type, float inputValue, bool addBeforeMultiplication)
     291    float PickupCollection::processModifiers(ModifierType::Value type, float inputValue, bool addBeforeMultiplication)
    292292    {
    293293        float outputValue = inputValue;
     
    310310        @return Returns the value after being processed.
    311311    */
    312     Vector3 PickupCollection::processModifiers(ModifierType::Enum type, Vector3 inputValue, bool addBeforeMultiplication)
     312    Vector3 PickupCollection::processModifiers(ModifierType::Value type, Vector3 inputValue, bool addBeforeMultiplication)
    313313    {
    314314        Vector3 outputValue = inputValue;
Note: See TracChangeset for help on using the changeset viewer.