Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9998 in orxonox.OLD for branches/playability


Ignore:
Timestamp:
Dec 3, 2006, 7:40:07 PM (18 years ago)
Author:
marcscha
Message:

multiple weapons, crosshair visibility → changelog

Location:
branches/playability
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/ChangeLog

    r9979 r9998  
     12006-12-03  Marc Schärer <marcscha@ee.ethz.ch>
     2  Added functionality to show / hide a crosshair to the weapon manager. No default crosshair anymore
     3  Multiple weapons per ship added
     4  Several small tweaks needed to make the above working added
     5
     6
    172006-11-29  Nicolas Schlumbgerger <nicolasc@ee.ethz.ch>
    28  Added bolt projectile for light blaster, copied of laser
  • branches/playability/src/world_entities/WorldEntities.am

    r9979 r9998  
    4242                \
    4343                world_entities/projectiles/bolt.cc \
     44                world_entities/projectiles/mbolt.cc \
    4445                world_entities/projectiles/hbolt.cc \
    4546                world_entities/projectiles/bomb.cc \
     
    150151                weapons/heavy_blaster.h \
    151152                \
     153                projectiles/bolt.h \
     154                projectiles/mbolt.h \
     155                projectiles/hbolt.h \
    152156                projectiles/bomb.h \
    153157                projectiles/laser.h \
  • branches/playability/src/world_entities/projectiles/bolt.cc

    r9979 r9998  
    4343  this->loadModel("models/projectiles/bolt.obj");   //!< Model not yet in repo
    4444
    45   this->setMinEnergy(10);
     45  this->setMinEnergy(1);
    4646  this->setHealthMax(0);
    4747  this->lifeSpan = 5.0;
     
    9090  }
    9191
    92   this->setDamage(20);
     92  this->setDamage(5);
    9393  this->setHealth(0);
    9494}
  • branches/playability/src/world_entities/projectiles/hbolt.cc

    r9991 r9998  
    4141  this->loadModel("models/projectiles/hbolt.obj");
    4242
    43   this->setMinEnergy(10);
     43  this->setMinEnergy(20);
    4444  this->setHealthMax(0);
    4545  this->lifeSpan = 5.0;
     
    9191  }
    9292
    93   this->setDamage(20);
     93  this->setDamage(100);
    9494  this->setHealth(0);
    9595}
  • branches/playability/src/world_entities/space_ships/space_ship.cc

    r9996 r9998  
    127127void SpaceShip::init()
    128128{
     129
    129130  //  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
    130131  this->registerObject(this, SpaceShip::_objectList);
     
    132133  PRINTF(4)("SPACESHIP INIT\n");
    133134
     135  secWeaponMan.showCrosshair();
     136
    134137  //weapons:
     138
    135139  Weapon* wpRight1 = new LightBlaster ();
    136140  wpRight1->setName("Light Blaster Right");
     
    139143
    140144  Weapon* wpRight2 = new MediumBlaster ();
    141   wpRight2->setName("Light Blaster Right");
     145  wpRight2->setName("Medium Blaster Right");
    142146  Weapon* wpLeft2 = new MediumBlaster ();
    143147  wpLeft2->setName("Medium Blaster Left");
     
    158162  this->weaponMan.addWeapon( wpLeft3, 0, 4);
    159163  this->weaponMan.addWeapon( wpRight3, 0, 5);
     164
    160165  this->secWeaponMan.addWeapon( cannon, 0, 0);
    161166
     
    168173  wpRight3->requestAction(WA_ACTIVATE);
    169174  wpLeft3->requestAction(WA_ACTIVATE);
     175
    170176  cannon->requestAction(WA_ACTIVATE);
    171177
     
    294300  this->weaponMan.getFixedTarget()->setParent(this);
    295301  this->weaponMan.getFixedTarget()->setRelCoor(100000,0,0);
    296 
     302 
    297303  this->secWeaponMan.getFixedTarget()->setParent(this);
    298304  this->secWeaponMan.getFixedTarget()->setRelCoor(100000,0,0);
  • branches/playability/src/world_entities/weapons/heavy_blaster.cc

    r9979 r9998  
    5151 
    5252
    53   this->setStateDuration(WS_SHOOTING, 0.5);
     53  this->setStateDuration(WS_SHOOTING, 0.5);   // 2 Schuss pro Sekunde
    5454  this->setStateDuration(WS_RELOADING, 0);
    5555  this->setStateDuration(WS_ACTIVATING, .5);
    5656  this->setStateDuration(WS_DEACTIVATING, 1);
    5757
    58   this->setEnergyMax(5000);
    59   this->increaseEnergy(5000);
     58  this->setEnergyMax(500);
     59  this->increaseEnergy(500);
    6060  //this->minCharge = 2;
    6161
     
    6666  this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL | WTYPE_LIGHT);
    6767  this->setProjectileTypeC("HBolt");   // FIXME temp project type until the blaste class exist
    68   this->prepareProjectiles(100);
     68  this->prepareProjectiles(5);
    6969
    7070  Animation3D* animation2 = this->getAnimation(WS_ACTIVATING, this);
  • branches/playability/src/world_entities/weapons/heavy_blaster.h

    r9975 r9998  
    88 *      @author Marc Schaerer <marcscha@ee.ethz.ch>
    99 * 
    10  *  Light Blaster class
     10 *  Heavy Blaster class
    1111 */
    1212class HeavyBlaster : public Weapon
  • branches/playability/src/world_entities/weapons/light_blaster.cc

    r9978 r9998  
    4444void LightBlaster::init()
    4545{
    46   //this->registerObject(this, LightBlaster::_objectList);
    47 
    48 //  this->model = (Model*)ResourceManager::getInstance()->load("models/guns/test_gun.obj", OBJ, RP_CAMPAIGN);
    4946
    5047  this->loadModel("models/guns/plasmadriver_#.obj", 1.0);
    5148 
    5249
    53   this->setStateDuration(WS_SHOOTING, 0.05);
     50  this->setStateDuration(WS_SHOOTING, 0.05);  // 20 Schuss pro Sekunde
    5451  this->setStateDuration(WS_RELOADING, 0);
    5552  this->setStateDuration(WS_ACTIVATING, .5);
    5653  this->setStateDuration(WS_DEACTIVATING, 1);
    5754
    58   this->setEnergyMax(5000);
    59   this->increaseEnergy(5000);
     55  this->setEnergyMax(500);
     56  this->increaseEnergy(500);
    6057  //this->minCharge = 2;
    6158
  • branches/playability/src/world_entities/weapons/medium_blaster.cc

    r9996 r9998  
    5151 
    5252
    53   this->setStateDuration(WS_SHOOTING, 0.2);
     53  this->setStateDuration(WS_SHOOTING, 0.1);   // 10 Schuss pro Sekunde
     54
    5455  this->setStateDuration(WS_RELOADING, 0);
    5556  this->setStateDuration(WS_ACTIVATING, .5);
    5657  this->setStateDuration(WS_DEACTIVATING, 1);
    5758
    58   this->setEnergyMax(5000);
    59   this->increaseEnergy(5000);
     59  this->setEnergyMax(500);
     60  this->increaseEnergy(500);
    6061  //this->minCharge = 2;
    6162
     
    6566
    6667  this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL | WTYPE_LIGHT);
    67   this->setProjectileTypeC("RailProjectile");   // FIXME temp project type until the blaste class exist
    68   this->prepareProjectiles(100);
     68  this->setProjectileTypeC("MBolt");   // FIXME temp project type until the blaste class exist
     69  this->prepareProjectiles(20);
    6970
    7071  Animation3D* animation2 = this->getAnimation(WS_ACTIVATING, this);
  • branches/playability/src/world_entities/weapons/medium_blaster.h

    r9975 r9998  
    88 *      @author Marc Schaerer <marcscha@ee.ethz.ch>
    99 * 
    10  *  Light Blaster class
     10 *  Medium Blaster class
    1111 */
    1212class MediumBlaster : public Weapon
  • branches/playability/src/world_entities/weapons/weapon.cc

    r9966 r9998  
    541541      unlikely(this->energy + this->ammoContainer->getStoredEnergy() < this->minCharge))
    542542  {
    543     this->requestAction(WA_DEACTIVATE);
     543    //this->requestAction(WA_DEACTIVATE);
    544544    this->execute();
    545545    return false;
  • branches/playability/src/world_entities/weapons/weapon_manager.cc

    r9996 r9998  
    103103
    104104  this->currentConfigID = 0;
    105   this->slotCount = 6;
     105  this->slotCount = WM_MAX_SLOTS;
    106106  //this->weaponChange;
    107107
     
    114114  this->crossHairSizeAnim->addKeyFrame(100, .05, ANIM_LINEAR);
    115115  this->crossHairSizeAnim->addKeyFrame(50, .01, ANIM_LINEAR);
     116
     117  this->hideCrosshair();
     118}
     119
     120void WeaponManager::showCrosshair()
     121{
     122  this->crosshair->setVisibility( true);
     123}
     124
     125void WeaponManager::hideCrosshair()
     126{
     127  this->crosshair->setVisibility( false);
    116128}
    117129
     
    300312    if (this->parentEntity->isA(Playable::staticClassID()))
    301313      dynamic_cast<Playable*>(this->parentEntity)->weaponConfigChanged();
     314   
    302315    weapon->setDefaultTarget(this->crosshair);
    303316  }
     
    416429          if( firingWeapon != NULL) firingWeapon->requestAction(WA_SHOOT);
    417430  }
    418   this->crosshair->setRotationSpeed(500);
    419   this->crossHairSizeAnim->replay();
     431
     432  /*
     433  if( this->crosshair != NULL)
     434  {
     435        this->crosshair->setRotationSpeed(500);
     436        this->crossHairSizeAnim->replay();
     437  } */
    420438}
    421439
  • branches/playability/src/world_entities/weapons/weapon_manager.h

    r9965 r9998  
    5959    virtual void loadParams(const TiXmlElement* root);
    6060    void loadWeapons(const TiXmlElement* root);
     61
     62    void showCrosshair();
     63    void hideCrosshair();
    6164
    6265    void setSlotCount(unsigned int slotCount);
Note: See TracChangeset for help on using the changeset viewer.