Changeset 10022 in orxonox.OLD for branches/playability/src/world_entities
- Timestamp:
- Dec 6, 2006, 2:38:25 PM (18 years ago)
- Location:
- branches/playability/src/world_entities/space_ships
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/space_ships/space_ship.cc
r10021 r10022 131 131 { 132 132 133 srand(time(0)); //initialize Random Nomber Generator 134 133 135 this->setSupportedPlaymodes(Playable::Vertical); 134 136 … … 201 203 shieldTH = .2* shieldMax; // shield power must be 20% before shield kicks in again 202 204 203 electronicCur = electronicMax = 50; 205 electronicCur = 1; 206 electronicMax = 50; 204 207 electronicRegen = 3; 205 208 electronicTH = .7 * electronicMax; // 30% of eDamage can be handled by the ship … … 766 769 767 770 768 bool SpaceShip::systemFailure()769 {770 //srand(time(0)); TODO implement771 return (this->electronicCur < /*rand() */ this->electronicTH);772 }773 774 775 771 void SpaceShip::enterPlaymode(Playable::Playmode playmode) 776 772 { -
branches/playability/src/world_entities/space_ships/space_ship.h
r10020 r10022 83 83 void weaponRegen(float time); //!< weapon energy regeneration 84 84 85 inline bool systemFailure() ;85 inline bool systemFailure() { return (this->electronicCur < float(rand())/float(RAND_MAX) * this->electronicTH); }; 86 86 87 87 //WeaponManager weaponMan; //!< the primary weapon manager: managing a list of energy weapons to wepaon-slot mapping
Note: See TracChangeset
for help on using the changeset viewer.