Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

some hack, but still does not work

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  
    145145
    146146  this->hideInactive = true;                       //< The Weapon will be hidden if it is inactive (by default)
     147  this->currentState = WS_INACTIVE;
    147148
    148149  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  
    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.