Changeset 10669 in orxonox.OLD for branches/vs-enhencements/src/world_entities/space_ships/space_ship.h
- Timestamp:
- Jun 3, 2007, 10:17:15 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/vs-enhencements/src/world_entities/space_ships/space_ship.h
r10661 r10669 67 67 inline void setShield(float cur, float max, float th, float regen) 68 68 { 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); }; 70 70 inline void setElectronic(float cur, float max, float th, float regen) 71 71 { this->electronicCur = cur; this->electronicMax = max; this->electronicTH = th; this->electronicRegen = regen; }; … … 80 80 81 81 //!< 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); }; 96 83 97 84 void addWeaponToSlot(int wm, int config, int slot, const std::string& weaponName); … … 101 88 inline float getShieldMax() { return this->shieldMax; }; //!< returns maximum shield value 102 89 103 inline float getArmorCur() { return this-> armorCur; }; //!< returns current armor value104 inline float getArmorMax() { return this-> armorMax; }; //!< returns current armor value90 inline float getArmorCur() { return this->getHealth(); }; //!< returns current armor value 91 inline float getArmorMax() { return this->getHealthMax(); }; //!< returns current armor value 105 92 106 93 inline float getElectronicCur() { return this->electronicCur; }; //!< returns current electronic value … … 157 144 OrxGui::GLGuiEnergyWidgetVertical* shieldWidget; //!< holds the widget that shows the shield bar 158 145 159 float armorCur; //!< current armor160 float armorMax; //!< maximum armor146 // float armorCur; //!< current armor 147 // float armorMax; //!< maximum armor 161 148 float armorRegen; //!< armor regeneration per tick (usable on bioships?) 162 149 //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.