Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 30, 2009, 2:27:26 PM (16 years ago)
Author:
danielh
Message:

first commit of pickup system

  • working PickupCollection
  • working PickupSpawner
  • base classes for items
  • updated Pawn to include PickupCollection
  • updated Projectile to use damage modifier on hit
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickups/src/orxonox/objects/weaponSystem/projectiles/Projectile.cc

    r2809 r2864  
    124124
    125125            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
    126131            if (victim)
    127                 victim->damage(this->damage_, this->owner_);
     132                victim->damage(dmg, this->owner_);
    128133        }
    129134        return false;
Note: See TracChangeset for help on using the changeset viewer.