Changeset 6561 in orxonox.OLD for trunk/src/world_entities/weapons/weapon_manager.cc
- Timestamp:
- Jan 18, 2006, 3:00:56 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/weapon_manager.cc
r6512 r6561 22 22 #include "weapon.h" 23 23 #include "crosshair.h" 24 25 #include "playable.h" 24 26 25 27 #include "load_param.h" … … 213 215 * a error message. 214 216 */ 215 voidWeaponManager::addWeapon(Weapon* weapon, int configID, int slotID)217 bool WeaponManager::addWeapon(Weapon* weapon, int configID, int slotID) 216 218 { 217 219 if (unlikely(configID >= WM_MAX_CONFIGS || slotID >= (int)this->slotCount)) 218 220 { 219 221 PRINTF(2)("Slot %d of config %d is not availiabe (max: %d)\n", slotID, configID, this->slotCount); 220 return ;222 return false; 221 223 } 222 224 … … 230 232 { 231 233 PRINTF(1)("There is no free slot in this WeaponConfig to dock this weapon at! Aborting\n"); 232 return ;234 return false; 233 235 } 234 236 } … … 239 241 PRINTF(2)("Unable to add Weapon with wrong capatibility to Slot %d (W:%d M:%d)\n", 240 242 slotID, weapon->getCapability(), this->currentSlotConfig[slotID].capability); 241 return ;243 return false; 242 244 } 243 245 … … 249 251 } 250 252 PRINTF(3)("Added a new Weapon to the WeaponManager: config %i/ slot %i\n", configID, slotID); 253 return true; 251 254 } 252 255
Note: See TracChangeset
for help on using the changeset viewer.