Changeset 9958 in orxonox.OLD for branches/playability/src/world_entities
- Timestamp:
- Nov 26, 2006, 12:31:01 AM (18 years ago)
- Location:
- branches/playability/src/world_entities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/projectiles/projectile.cc
r9957 r9958 152 152 this->soundSource.play(this->explosionBuffer); 153 153 } 154 155 int Projectile::getPhysDamage () { return this->physDamage; }156 157 int Projectile::getElecDamage () { return this->elecDamage; } -
branches/playability/src/world_entities/projectiles/projectile.h
r9957 r9958 52 52 inline bool tickLifeCycle(float dt ) { this->lifeCycle += dt/this->lifeSpan; return(unlikely(this->lifeCycle >= 1)); } 53 53 54 virtual int getPhysDamage();55 virtual int getElecDamage();54 inline int getPhysDamage() { return this->physDamage; }; 55 inline int getElecDamage() { return this->elecDamage; }; 56 56 57 57 protected: -
branches/playability/src/world_entities/space_ships/space_ship.cc
r9957 r9958 177 177 //registerEvent(SDLK_e); 178 178 registerEvent(KeyMapper::PEV_FIRE1); 179 registerEvent(KeyMapper::PEV_FIRE2); // Added for secondary weapon support 179 180 registerEvent(KeyMapper::PEV_NEXT_WEAPON); 180 181 registerEvent(KeyMapper::PEV_PREVIOUS_WEAPON); … … 345 346 } 346 347 348 // Shield Regeneration and other regular calculations on the ship 349 this->regen(time); 350 347 351 348 352 // if( this != State::getPlayer()->getControllable()) … … 503 507 else if( event.type == KeyMapper::PEV_BACKWARD) 504 508 this->bDown = event.bPressed; //this->shiftCoor(0,-.1,0); 509 else if( event.type == KeyMapper::PEV_FIRE1) 510 firedWeapon = curWeaponPrimary; 511 else if( event.type == KeyMapper::PEV_FIRE2) 512 firedWeapon = curWeaponSecondary; 505 513 else if( event.type == EV_MOUSE_MOTION) 506 514 { -
branches/playability/src/world_entities/space_ships/space_ship.h
r9957 r9958 2 2 * @file space_ship.h 3 3 * Implements the Control of a Spaceship 4 * Space Ships are the core class for all types of ships in Orxonox 4 5 */ 5 6 … … 57 58 inline float getElectronicMax() { return this->electronicMax; }; //!< returns current electronic value 58 59 60 inline int getFiredWeapon() { return this->firedWeapon; }; //!< returns index of the fired weapon 61 59 62 //damage handler 60 63 virtual void damage(float pDamage, float eDamage); //!< pDamage physical damage, eDamage electronic damage … … 95 98 int reactorCapacity; //!< reactor capacity 96 99 100 101 int curWeaponPrimary; //!< current primary weapon 102 int curWeaponSecondary; //!< current secondary weapon 103 int firedWeapon; //!< index of the fired weapon for the weapon manager 104 97 105 bool bUp; //!< up button pressed. 98 106 bool bDown; //!< down button pressed.
Note: See TracChangeset
for help on using the changeset viewer.