- Timestamp:
- Dec 3, 2008, 4:07:49 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickups2/src/orxonox/objects/pickup/Item.cc
r2293 r2324 8 8 #include "util/String.h" 9 9 #include "objects/worldentities/pawns/Pawn.h" 10 10 11 11 12 namespace orxonox … … 30 31 bool Item::addTo (Pawn* player) 31 32 { 33 34 return player->getPickUp().insert(this); 32 35 /*if(checkSlot(player)==true) 33 36 player->pickUp.Equipment.insert ( std::pair<std::string, Item*>(this->getName(),this) ); 34 37 else 35 38 COUT(3) << "swap?" << std::endl;*/ 36 return player->getPickUp().insert(this);37 39 } 38 40 bool Item::remove(Pawn* player) … … 51 53 bool Item::checkSlot(Pawn* player) 52 54 { 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++ ) 55 57 { 56 58 if((*it).second->playerBaseClass_==this->playerBaseClass_) 57 59 return false; 58 60 } 59 return true; */60 return player->getPickUp().checkSlot(this);61 return true; 62 //return player->getPickUp().checkSlot(player); 61 63 } 62 64 void Item::setPlayerBaseClassName(const std::string& name)
Note: See TracChangeset
for help on using the changeset viewer.