Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 3, 2007, 10:17:15 PM (17 years ago)
Author:
nicolasc
Message:

some modularisaztion hacking
hardlinked armor to WE Health

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/vs-enhencements/src/world_entities/space_ships/space_ship.h

    r10661 r10669  
    6767    inline void setShield(float cur, float max, float th, float regen)
    6868        { this->shieldCur = cur; this->shieldMax = max; this->shieldTH = th; this->shieldRegen = regen;};
    69     inline void setArmor(float cur, float max) { this->armorCur = cur; this->armorMax = max; updateHealth(); };
     69    inline void setArmor(float cur, float max) { this->setHealth(cur); this->setHealthMax(max); };
    7070    inline void setElectronic(float cur, float max, float th, float regen)
    7171        { this->electronicCur = cur; this->electronicMax = max; this->electronicTH = th; this->electronicRegen = regen; };
     
    8080
    8181    //!< Resynchonizes armor with health in WE!!
    82     inline void updateHealth() { this->setHealth(this->armorCur); this->setHealthMax(this->armorMax); };
    83 
    84     inline void setWMSlotCount(int wm, int slot) {
    85       if (wm == 1) { this->weaponMan.setSlotCount(slot); }
    86       if (wm == 2) { this->secWeaponMan.setSlotCount(slot); }
    87       else return; };
    88     inline void createWeaponSlot(int wm, int slot, Vector location, long capability) {
    89       if (wm == 1) {
    90         this->weaponMan.setSlotPosition(slot, location);
    91         this->weaponMan.setSlotCapability(slot, capability); }
    92       if (wm == 2) {
    93         this->secWeaponMan.setSlotPosition(slot, location);
    94         this->secWeaponMan.setSlotCapability(slot, capability); }
    95       else return; };
     82//     inline void updateHealth() { this->setHealth(this->armorCur); this->setHealthMax(this->armorMax); };
    9683
    9784    void addWeaponToSlot(int wm, int config, int slot, const std::string& weaponName);
     
    10188    inline float getShieldMax() { return this->shieldMax; };        //!< returns maximum shield value
    10289
    103     inline float getArmorCur() { return this->armorCur; };          //!< returns current armor value
    104     inline float getArmorMax() { return this->armorMax; };          //!< returns current armor value
     90    inline float getArmorCur() { return this->getHealth(); };          //!< returns current armor value
     91    inline float getArmorMax() { return this->getHealthMax(); };          //!< returns current armor value
    10592
    10693    inline float getElectronicCur() { return this->electronicCur; }; //!< returns current electronic value
     
    157144    OrxGui::GLGuiEnergyWidgetVertical* shieldWidget; //!< holds the widget that shows the shield bar
    158145
    159     float       armorCur;           //!< current armor
    160     float       armorMax;           //!< maximum armor
     146//    float       armorCur;           //!< current armor
     147//    float       armorMax;           //!< maximum armor
    161148    float       armorRegen;         //!< armor regeneration per tick (usable on bioships?)
    162149    //note that the armor widget is set on the health- widget in world- entity (see in player.cc)
Note: See TracChangeset for help on using the changeset viewer.