Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 15, 2009, 5:03:58 PM (16 years ago)
Author:
landauf
Message:

merged pickup into pickup2

Location:
code/branches/pickups2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickups2

  • code/branches/pickups2/src/orxonox/objects/worldentities/pawns/Pawn.cc

    r2904 r2917  
    6161        this->spawnparticleduration_ = 3.0f;
    6262
    63         this->getPickUp().setPlayer(this);
     63        this->getPickups().setOwner(this);
    6464
    6565        if (GameMode::isMaster())
     
    205205            this->setDestroyWhenPlayerLeft(false);
    206206
     207            this->dropItems();
     208
    207209            if (this->getGametype())
    208210                this->getGametype()->pawnKilled(this, this->lastHitOriginator_);
     
    266268    void Pawn::dropItems()
    267269    {
    268         pickUp.eraseAll();
     270        this->getPickups().clear();
    269271    }
    270272
  • code/branches/pickups2/src/orxonox/objects/worldentities/pawns/Pawn.h

    r2826 r2917  
    3131
    3232#include "OrxonoxPrereqs.h"
    33 #include "objects/pickup/ShipEquipment.h"
    3433#include "objects/worldentities/ControllableEntity.h"
    3534#include "objects/RadarViewable.h"
    3635#include "objects/weaponSystem/WeaponSystem.h"
     36#include "objects/pickup/PickupCollection.h"
    3737
    3838namespace orxonox
     
    107107                { return this->numexplosionchunks_; }
    108108
    109             inline ShipEquipment& getPickUp()
    110                 {return this->pickUp;}
    111 
    112109            virtual void dropItems();
     110            inline PickupCollection& getPickups()
     111                { return this->pickups_; }
     112            virtual void useItem()
     113                { this->pickups_.useItem(); }
    113114
    114115        protected:
     
    117118            virtual void spawneffect();
    118119
    119             ShipEquipment pickUp;
    120120            bool bAlive_;
    121121
     122            PickupCollection pickups_;
    122123
    123124            float health_;
Note: See TracChangeset for help on using the changeset viewer.