Changeset 9963 in orxonox.OLD for branches/playability/src/world_entities/space_ships/space_ship.cc
- Timestamp:
- Nov 28, 2006, 2:46:25 PM (17 years ago)
- File:
-
- 1 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)
Note: See TracChangeset
for help on using the changeset viewer.