Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 6, 2006, 1:11:02 PM (19 years ago)
Author:
nicolasc
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/space_ships/space_ship.cc

    r10019 r10020  
    5151
    5252#include "util/loading/load_param.h"
     53#include "time.h"
    5354
    5455
     
    198199  shieldCur         = 20;
    199200  shieldMax         = 100;
     201  shieldTH          = .2* shieldMax;   // shield power must be 20% before shield kicks in again
     202
     203  electronicCur     = 10;
     204  electronicMax     = 50;
     205  electronicRegen   = 3;
     206  electronicTH      = .7 * electronicMax; // 30% of eDamage can be handled by the ship
    200207
    201208  /*
     
    372379  //this->airFriction = 0.0f;
    373380
     381  srand(time(0));  //initaialize RNG
     382
    374383  this->travelNode->debugDraw();
    375384}
     
    492501  this->weaponMan.tick(time);
    493502  this->secWeaponMan.tick(time);
     503
     504  if( this->systemFailure() )
     505    bFire = bSecFire = false;
    494506
    495507  if( this->bFire)
     
    755767
    756768
     769bool SpaceShip::systemFailure()
     770{
     771   return (this->electronicCur < /*this->rand() */ this->electronicTH); //TODO cleanup
     772}
     773
     774
    757775void SpaceShip::enterPlaymode(Playable::Playmode playmode)
    758776{
     
    856874  if (this->getRelCoor().z < this->travelDistanceMinus.y) this->setRelCoor(oldCoor.x, oldCoor.y, this->travelDistanceMinus.y);
    857875
     876  if( this->systemFailure() )
     877    bForward = bBackward = bLeft = bRight = false;
     878
     879
    858880  if( this->bForward )
    859881  {
Note: See TracChangeset for help on using the changeset viewer.