Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 3, 2008, 4:07:49 PM (16 years ago)
Author:
dsommer
Message:

Aufnehmen von festen Item und wieder ablegen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickups2/src/orxonox/objects/pickup/Item.cc

    r2293 r2324  
    88#include "util/String.h"
    99#include "objects/worldentities/pawns/Pawn.h"
     10
    1011
    1112namespace orxonox
     
    3031bool Item::addTo (Pawn* player)
    3132{
     33       
     34        return player->getPickUp().insert(this);
    3235        /*if(checkSlot(player)==true)
    3336        player->pickUp.Equipment.insert ( std::pair<std::string, Item*>(this->getName(),this) );
    3437        else
    3538        COUT(3) << "swap?" << std::endl;*/
    36         return player->getPickUp().insert(this);
    3739}
    3840bool Item::remove(Pawn* player)
     
    5153bool Item::checkSlot(Pawn* player)
    5254{
    53         /*std::multimap<std::string,Item*>::iterator it;
    54         for ( it=player->pickUp.Equipment.begin() ; it != player->pickUp.Equipment.end(); it++ )
     55        std::multimap<std::string,Item*>::iterator it;
     56        for ( it=player->getPickUp().getEquipment().begin() ; it != player->getPickUp().getEquipment().end(); it++ )
    5557        {
    5658        if((*it).second->playerBaseClass_==this->playerBaseClass_)
    5759        return false;
    5860        }
    59         return true;*/
    60         return player->getPickUp().checkSlot(this);
     61        return true;
     62        //return player->getPickUp().checkSlot(player);
    6163}
    6264void Item::setPlayerBaseClassName(const std::string& name)
Note: See TracChangeset for help on using the changeset viewer.