Changeset 5441 in orxonox.OLD for trunk/src/world_entities/weapons/weapon_manager.cc
- Timestamp:
- Oct 27, 2005, 11:46:46 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/weapon_manager.cc
r5440 r5441 229 229 if (slotID == -1) // WM_FREE_SLOT 230 230 { 231 slotID = this->getNextFreeSlot(configID );231 slotID = this->getNextFreeSlot(configID, weapon->getCapability()); 232 232 if( slotID < 0 || slotID >= this->slotCount) 233 233 { 234 PRINTF( 0)("There is no free slot in this WeaponConfig to dock this weapon at! Aborting\n");234 PRINTF(1)("There is no free slot in this WeaponConfig to dock this weapon at! Aborting\n"); 235 235 return; 236 236 } 237 } 238 239 if (!(this->currentSlotConfig[slotID].capability & weapon->getCapability() & WTYPE_ALLKINDS) && 240 this->currentSlotConfig[slotID].capability & weapon->getCapability() & WTYPE_ALLDIRS) 241 { 242 PRINTF(2)("Unable to add Weapon with wrong capatibility to Slot %d (W:%d M:%d)\n", 243 slotID, weapon->getCapability(), this->currentSlotConfig[slotID].capability); 244 return; 237 245 } 238 246 … … 407 415 { 408 416 if( this->configs[configID][i] == NULL && 409 (this->currentSlotConfig[i].capability & capability == this->currentSlotConfig[i].capability)) 417 (this->currentSlotConfig[i].capability & capability & WTYPE_ALLKINDS) && 418 (this->currentSlotConfig[i].capability & capability & WTYPE_ALLDIRS)) 410 419 return i; 411 420 }
Note: See TracChangeset
for help on using the changeset viewer.