Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6444 in orxonox.OLD for trunk/src/world_entities/weapons


Ignore:
Timestamp:
Jan 8, 2006, 10:45:03 PM (19 years ago)
Author:
bensch
Message:

trunk: sliders get updated, as they should be

Location:
trunk/src/world_entities/weapons
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weapons/weapon.cc

    r6439 r6444  
    421421    if (likely(this->soundBuffers[WA_ACTIVATE] != NULL))
    422422      this->soundSource->play(this->soundBuffers[WA_ACTIVATE]);
     423    this->updateWidgets();
    423424    // activate
    424425    PRINTF(4)("Activating the Weapon %s\n", this->getName());
     
    482483    if (this->soundBuffers[WA_SHOOT] != NULL)
    483484      this->soundSource->play(this->soundBuffers[WA_SHOOT]);
     485    this->updateWidgets();
    484486    // fire
    485487    this->energyLoaded -= this->minCharge;
     
    526528    this->energy -= chargeSize;
    527529  }
     530
     531  this->updateWidgets();
    528532  this->reload();
    529533  this->enterState(WS_RELOADING);
  • trunk/src/world_entities/weapons/weapon_manager.h

    r6442 r6444  
    99 * @TODO 1. WeaponManager should also handle a List of availiableWeapons.
    1010 */
     11
     12#ifndef _WEAPON_MANAGER_H
     13#define _WEAPON_MANAGER_H
    1114
    1215#include "base_object.h"
     
    7073    void addWeapon(Weapon* weapon, int configID = -1, int slotID = -1);
    7174    void removeWeapon(Weapon* weapon, int configID = -1);
    72     Weapon* getWeapon(int slotID) const { return (slotID >= 0 && slotID < this->slotCount)? this->currentSlotConfig[slotID].currentWeapon: NULL; };
     75    Weapon* getWeapon(int slotID) const { return (slotID >= 0 && slotID < this->slotCount)? this->currentSlotConfig[slotID].nextWeapon: NULL; };
    7376
    7477    // FIXME ::
     
    109112    tAnimation<Crosshair>*  crossHairSizeAnim;                        //!< An animation for the crosshair (scaling)
    110113};
     114
     115
     116#endif /* _WEAPON_MANAGER_H */
Note: See TracChangeset for help on using the changeset viewer.