Changeset 9963 in orxonox.OLD for branches/playability/src/world_entities
- Timestamp:
- Nov 28, 2006, 2:46: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
r9962 r9963 616 616 void SpaceShip::regen(float time){ 617 617 float tmp; 618 if (this->shieldCur != this->shieldMax){ 618 if (this->armorCur != this->armorMax || this->armorRegen != 0){ 619 tmp = this->armorCur + this->armorRegen * time; 620 if ( tmp > electronicMax) 621 this->armorCur = this->armorMax; 622 else 623 this->armorCur = tmp; 624 } 625 if (this->shieldCur != this->shieldMax || this->shieldRegen != 0){ 619 626 tmp = this->shieldCur + this->shieldRegen * time; 620 627 if( tmp > shieldMax) … … 624 631 this->shieldActive = ( this->shieldActive || this->shieldCur > shieldTH); 625 632 } 626 if (this->electronicCur != this->electronicMax ){633 if (this->electronicCur != this->electronicMax || this->electronicRegen != 0){ 627 634 tmp = this->electronicCur + this->electronicRegen * time; 628 635 if ( tmp > electronicMax) -
branches/playability/src/world_entities/space_ships/space_ship.h
r9961 r9963 85 85 float armorCur; //!< current armor 86 86 float armorMax; //!< maximum armor 87 float armorRegen; //!< armor regeneration per tick (usable on bioships?) 87 88 88 89 float electronicCur; //!< current electronic
Note: See TracChangeset
for help on using the changeset viewer.