Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 25, 2009, 8:30:15 PM (15 years ago)
Author:
landauf
Message:

merged pickups2 branch back to trunk. not yet tested.

Location:
code/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc

    r3053 r3073  
    6666        this->spawnparticleduration_ = 3.0f;
    6767
    68         this->getPickUp().setPlayer(this);
     68        this->getPickups().setOwner(this);
    6969
    7070        if (GameMode::isMaster())
     
    214214            this->setDestroyWhenPlayerLeft(false);
    215215
     216            this->dropItems();
     217
    216218            if (this->getGametype())
    217219                this->getGametype()->pawnKilled(this, this->lastHitOriginator_);
     
    278280    void Pawn::dropItems()
    279281    {
    280         pickUp.eraseAll();
     282        this->getPickups().clear();
    281283    }
    282284
  • code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.h

    r3053 r3073  
    3131
    3232#include "OrxonoxPrereqs.h"
    33 #include "objects/pickup/ShipEquipment.h"
    3433#include "objects/worldentities/ControllableEntity.h"
    3534#include "objects/RadarViewable.h"
     35#include "objects/pickup/PickupCollection.h"
    3636
    3737namespace orxonox
     
    106106                { return this->numexplosionchunks_; }
    107107
    108             inline ShipEquipment& getPickUp()
    109                 {return this->pickUp;}
    110 
    111108            virtual void dropItems();
     109            inline PickupCollection& getPickups()
     110                { return this->pickups_; }
     111            virtual void useItem()
     112                { this->pickups_.useItem(); }
    112113
    113114        protected:
     
    119120            virtual void spawneffect();
    120121
    121             ShipEquipment pickUp;
    122122            bool bAlive_;
    123123
     124            PickupCollection pickups_;
    124125
    125126            float health_;
Note: See TracChangeset for help on using the changeset viewer.