Changeset 10684 in orxonox.OLD for branches/vs-enhencements/src/world_entities/weapons/weapon_slot.h
- Timestamp:
- Jun 11, 2007, 11:30:56 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/vs-enhencements/src/world_entities/weapons/weapon_slot.h
r10678 r10684 43 43 inline void addWeapon(const std::string& weaponName, int config) {this->configs[config] = Weapon::createWeapon(weaponName); } 44 44 inline void setWeapon(Weapon* weapon, int config) {this->configs[config] = weapon; }; 45 inline Weapon* getWeapon(int config) { if (config > WM_MAX_CONFIGS ) return NULL; return this->configs[config]; };45 inline Weapon* getWeapon(int config) { if (config > WM_MAX_CONFIGS || config < 0) return NULL; return this->configs[config]; }; 46 46 47 47 inline void setWeaponConfig(int slot, int side) { this->weaponSlot = slot; this->weaponSide = side; }
Note: See TracChangeset
for help on using the changeset viewer.