Changeset 11325 for code/branches/HUD_HS16/src/modules/pickup
- Timestamp:
- Dec 8, 2016, 6:34:27 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/HUD_HS16/src/modules/pickup/PickupManager.cc
r11323 r11325 314 314 315 315 this->indexes_.erase(pickup); 316 this->pickups_. find(index)->second=nullptr; //set to null, so that can be identified as free slot by getPickupIndex()316 this->pickups_.erase(index); //set to null, so that can be identified as free slot by getPickupIndex() 317 317 318 318 … … 355 355 PickupManager& manager = PickupManager::getInstance(); 356 356 357 if(!manager.pickups_.count(index)) return; //if pickup is no longer here, dont do anything 358 357 359 Pickupable* pickup=manager.pickups_.find(index)->second; 358 360 if(pickup==nullptr) … … 364 366 orxout() << "The pickup is being used: " << pickup->isUsed() << endl; 365 367 366 pickup->drop(true); 368 manager.dropPickup(index); 369 367 370 // if(pickup->isUsed()) 368 371 // manager.usePickup(index, false); … … 557 560 for(uint32_t i=0; i<10; i++) 558 561 { 559 if( pickups_.find(i)->second==nullptr) return i;562 if(!pickups_.count(i)) return i; 560 563 } 561 564 //all slots are full and we have to drop sth
Note: See TracChangeset
for help on using the changeset viewer.