Changeset 5965 in orxonox.OLD for branches/powerups/src/world_entities/weapons
- Timestamp:
- Dec 7, 2005, 3:45:26 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/powerups/src/world_entities/weapons/weapon_manager.cc
r5955 r5965 408 408 409 409 /** 410 * privategets the next free slot in a certain weaponconfig410 * gets the next free slot in a certain weaponconfig 411 411 * @param the selected weaponconfig 412 412 */ 413 413 int WeaponManager::getNextFreeSlot(int configID, long capability) 414 414 { 415 for( int i = 0; i < this->slotCount; ++i) 416 { 417 if( this->configs[configID][i] == NULL && 418 (this->currentSlotConfig[i].capability & capability & WTYPE_ALLKINDS) && 419 (this->currentSlotConfig[i].capability & capability & WTYPE_ALLDIRS)) 420 return i; 421 } 415 /*if(configID == -1) { 416 for(int i = 0; i < WM_MAX_CONFIGS; ++i) 417 { 418 int slot = this->getNextFreeSlot(i, capability); 419 if(slot >= 0) return slot; 420 } 421 } 422 else {*/ 423 for( int i = 0; i < this->slotCount; ++i) 424 { 425 if( this->configs[configID][i] == NULL && 426 (this->currentSlotConfig[i].capability & capability & WTYPE_ALLKINDS) && 427 (this->currentSlotConfig[i].capability & capability & WTYPE_ALLDIRS)) 428 return i; 429 } 430 //} 422 431 return -1; 423 432 }
Note: See TracChangeset
for help on using the changeset viewer.