Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 11, 2007, 11:30:56 AM (18 years ago)
Author:
nicolasc
Message:

some hack, but still does not work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/vs-enhencements/src/world_entities/weapons/weapon_slot.h

    r10678 r10684  
    4343  inline void addWeapon(const std::string& weaponName, int config) {this->configs[config] = Weapon::createWeapon(weaponName); }
    4444  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]; };
    4646
    4747  inline void setWeaponConfig(int slot, int side) { this->weaponSlot = slot; this->weaponSide = side; }
Note: See TracChangeset for help on using the changeset viewer.