- Timestamp:
- Dec 6, 2006, 1:11:02 PM (18 years ago)
- Location:
- branches/playability/src/world_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/projectiles/projectile.cc
r9969 r10020 192 192 void Projectile::tick (float dt) 193 193 { 194 float tti ; //!< time to impact194 float tti = 0; //!< time to impact 195 195 Vector estTargetDir = (this->target->getRelCoor() + this->target->getVelocity()); 196 196 this->velocity = this->newDirection(this->velocity, estTargetDir, this->turningSpeed * dt ) * this->velocity.len(); -
branches/playability/src/world_entities/space_ships/space_ship.cc
r10019 r10020 51 51 52 52 #include "util/loading/load_param.h" 53 #include "time.h" 53 54 54 55 … … 198 199 shieldCur = 20; 199 200 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 200 207 201 208 /* … … 372 379 //this->airFriction = 0.0f; 373 380 381 srand(time(0)); //initaialize RNG 382 374 383 this->travelNode->debugDraw(); 375 384 } … … 492 501 this->weaponMan.tick(time); 493 502 this->secWeaponMan.tick(time); 503 504 if( this->systemFailure() ) 505 bFire = bSecFire = false; 494 506 495 507 if( this->bFire) … … 755 767 756 768 769 bool SpaceShip::systemFailure() 770 { 771 return (this->electronicCur < /*this->rand() */ this->electronicTH); //TODO cleanup 772 } 773 774 757 775 void SpaceShip::enterPlaymode(Playable::Playmode playmode) 758 776 { … … 856 874 if (this->getRelCoor().z < this->travelDistanceMinus.y) this->setRelCoor(oldCoor.x, oldCoor.y, this->travelDistanceMinus.y); 857 875 876 if( this->systemFailure() ) 877 bForward = bBackward = bLeft = bRight = false; 878 879 858 880 if( this->bForward ) 859 881 { -
branches/playability/src/world_entities/space_ships/space_ship.h
r10019 r10020 83 83 void weaponRegen(float time); //!< weapon energy regeneration 84 84 85 inline bool systemFailure(); 86 85 87 //WeaponManager weaponMan; //!< the primary weapon manager: managing a list of energy weapons to wepaon-slot mapping 86 88 WeaponManager secWeaponMan; //!< the secondary weapon manager: managing a list of special weapons to weapon-slot mapping … … 104 106 float electronicMax; //!< maximum electronic 105 107 float electronicRegen; //!< electronic regenration rate per tick 108 float electronicTH; //!< Threshhold for electronic failure 106 109 107 110 float engineSpeedCur; //!< speed output for movement = speed base + energy share part
Note: See TracChangeset
for help on using the changeset viewer.