Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10036 in orxonox.OLD


Ignore:
Timestamp:
Dec 10, 2006, 1:08:50 PM (17 years ago)
Author:
nicolasc
Message:

equalized energy usage of all blasters
solved the fire echo problem, by implementing the releaseFire()
other spaceships need update

Location:
branches/playability/src/world_entities
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/projectiles/hbolt.cc

    r10005 r10036  
    4141  this->loadModel("models/projectiles/hbolt.obj");
    4242
    43   this->setMinEnergy(20);
     43  this->setMinEnergy(10);
    4444  this->setHealthMax(0);
    4545  this->lifeSpan = 5.0;
  • branches/playability/src/world_entities/projectiles/mbolt.cc

    r9999 r10036  
    4242  this->loadModel("models/projectiles/laser.obj");
    4343
    44   this->setMinEnergy(10);
     44  this->setMinEnergy(4);
    4545  this->setHealthMax(0);
    4646  this->lifeSpan = 5.0;
  • branches/playability/src/world_entities/space_ships/space_ship.cc

    r10032 r10036  
    512512
    513513  if( this->bFire)
    514   {
    515514    this->weaponMan.fire();
    516   }
     515  else
     516    this->weaponMan.releaseFire();
     517
    517518  if( this->bSecFire)
    518   {
    519519    this->secWeaponMan.fire();
    520     this->bSecFire = !this->bSecFire;   // FIXME This currently is needed to prevent "echo fires" of a second rocket after its cooldown has passed
    521   }
     520  else
     521    this->secWeaponMan.releaseFire();
    522522
    523523
  • branches/playability/src/world_entities/weapons/medium_blaster.cc

    r9998 r10036  
    5151 
    5252
    53   this->setStateDuration(WS_SHOOTING, 0.1);   // 10 Schuss pro Sekunde
     53  this->setStateDuration(WS_SHOOTING, 0.2);   // 5 Schuss pro Sekunde
    5454
    5555  this->setStateDuration(WS_RELOADING, 0);
  • branches/playability/src/world_entities/weapons/weapon.cc

    r10030 r10036  
    352352  if (likely(this->isActive()))
    353353  {
    354     if (this->requestedAction != WA_NONE)
    355       return;
     354    //if (this->requestedAction != WA_NONE)
     355    //  return;
    356356    PRINTF(5)("next action will be %s in %f seconds\n", actionToChar(action), this->stateDuration);
    357357    this->requestedAction = action;
  • branches/playability/src/world_entities/weapons/weapon_manager.cc

    r10023 r10036  
    116116
    117117  this->hideCrosshair();
     118
     119  this->bFire = false;
    118120}
    119121
     
    441443}
    442444
     445/**
     446 * triggers fire of all weapons in the current weaponconfig
     447 */
     448void WeaponManager::releaseFire()
     449{
     450  Weapon* firingWeapon;
     451  for(int i = 0; i < this->slotCount; i++)
     452  {
     453    firingWeapon = this->currentSlotConfig[i].currentWeapon;
     454    if( firingWeapon != NULL) firingWeapon->requestAction(WA_NONE);
     455  }
     456
     457  /*
     458  this->crosshair->setRotationSpeed(500);
     459  this->crossHairSizeAnim->replay();
     460  */
     461}
    443462
    444463/**
     
    449468{
    450469  Weapon* tickWeapon;
     470
    451471
    452472  for(int i = 0; i < this->slotCount; i++)
  • branches/playability/src/world_entities/weapons/weapon_manager.h

    r10004 r10036  
    103103    //! @TODO: implement this function (maybe also in Weapon itself)
    104104    void releaseFire();
     105    //inline void setFire() { this->bFire = true; };
    105106
    106107    void tick(float dt);
     
    131132
    132133    std::vector<CountPointer<AmmoContainer> > ammo;                   //!< Containers
     134
     135    bool                    bFire;
    133136};
    134137
Note: See TracChangeset for help on using the changeset viewer.