Changeset 10684 in orxonox.OLD for branches/vs-enhencements/src/world_entities/weapons
- Timestamp:
- Jun 11, 2007, 11:30:56 AM (18 years ago)
- Location:
- branches/vs-enhencements/src/world_entities/weapons
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/vs-enhencements/src/world_entities/weapons/weapon.cc
r10648 r10684 145 145 146 146 this->hideInactive = true; //< The Weapon will be hidden if it is inactive (by default) 147 this->currentState = WS_INACTIVE; 147 148 148 149 this->minCharge = 1.0; //< The minimum charge the Weapon can hold is 1 unit. -
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.