Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5819 in orxonox.OLD for trunk/src/world_entities/weapons


Ignore:
Timestamp:
Nov 29, 2005, 11:07:43 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: merged branches world_entities to trunk again
merged with command
svn merge -r5795:HEAD branches/world_entities/ trunk/
no conflicts (what a wonder)

Location:
trunk/src/world_entities/weapons
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weapons/aiming_turret.cc

    r5769 r5819  
    4949
    5050  this->setActionSound(WA_SHOOT, "sound/shot1.wav");
    51   this->setActionSound(WA_ACTIVATE, "sound/vocals/missiles.wav");
     51  this->setActionSound(WA_ACTIVATE, "sound/voices/rockets.wav");
    5252  this->setActionSound(WA_RELOAD, "sound/vocals/reload.wav");
    5353}
  • trunk/src/world_entities/weapons/cannon.cc

    r5750 r5819  
    8787  //this->minCharge = 2;
    8888
    89   this->setActionSound(WA_SHOOT, "sound/shot1.wav");
     89  this->setActionSound(WA_SHOOT, "sound/explo.wav");
     90  this->setActionSound(WA_ACTIVATE, "sound/voices/cannon.wav");
    9091
    9192  this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
  • trunk/src/world_entities/weapons/ground_turret.cc

    r5795 r5819  
    8181   * @todo: make the class Loadable
    8282   */
    83 //  LoadParamXML(root, "Weapons", this, GroundTurret, loadWeapon);
     83  const TiXmlElement* element;
     84
     85  element = root->FirstChildElement("weapon-left");
     86  if (element != NULL) element = element->FirstChildElement();
     87  this->left = dynamic_cast<Weapon*>( Factory::getFirst()->fabricate( element) );
     88  if (this->left)
     89  {
     90    this->left->setParent(this);
     91    this->left->setRelCoor(0,10,-5);
     92  }
     93
     94  element = root->FirstChildElement("weapon-right");
     95  if (element != NULL)  if (element != NULL) element = element->FirstChildElement();
     96  this->right = dynamic_cast<Weapon*>( Factory::getFirst()->fabricate( element) );
     97  if (this->right)
     98  {
     99    this->right->setParent(this);
     100    this->right->setRelCoor(0,10,5);
     101  }
    84102}
    85 
    86103
    87104/**
     
    113130  if (this->model)
    114131    this->model->draw();
    115   if (left != NULL)
     132
     133  glPopMatrix();
     134  if (this->left != NULL)
    116135    this->left->draw();
    117136  if (this->right != NULL)
    118137    this->right->draw();
    119 
    120   glPopMatrix();
    121138}
    122139
  • trunk/src/world_entities/weapons/ground_turret.h

    r5795 r5819  
    2222  void loadParams(const TiXmlElement* root);
    2323
    24   void loadWeapons(const TiXmlElement* root);
    25 
    2624  virtual void postSpawn ();
    2725  virtual void leftWorld ();
  • trunk/src/world_entities/weapons/rocket.cc

    r5779 r5819  
    4646  this->energyMin = 1;
    4747  this->energyMax = 10;
    48   this->lifeSpan = 2;
     48  this->lifeSpan = 5;
    4949
    5050  this->emitter = new ParticleEmitter(Vector(0,1,0), M_2_PI, 100, 5);
  • trunk/src/world_entities/weapons/test_gun.cc

    r5750 r5819  
    131131  //this->minCharge = 2;
    132132
    133   this->setActionSound(WA_SHOOT, "sound/shot1.wav");
     133  this->setActionSound(WA_SHOOT, "sound/laser.wav");
     134  this->setActionSound(WA_ACTIVATE, "sound/voices/lasers.wav");
     135
    134136
    135137  this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
  • trunk/src/world_entities/weapons/turret.cc

    r5766 r5819  
    4444  this->init();
    4545
    46   this->loadModel("models/guns/turret1.obj");
    47 
    48 
    4946  this->setActionSound(WA_SHOOT, "sound/shot1.wav");
    5047  this->setActionSound(WA_ACTIVATE, "sound/vocals/missiles.wav");
    5148  this->setActionSound(WA_RELOAD, "sound/vocals/reload.wav");
     49
     50  this->loadModel("models/guns/turret1.obj");
    5251}
    5352
     
    7271{
    7372  this->setClassID(CL_TURRET, "Turret");
     73
    7474
    7575  Animation3D* animation1 = this->getAnimation(WS_ACTIVATING, this);
     
    136136    return;
    137137
    138     pj->setVelocity(this->getVelocity()+(this->getAbsDir().apply(Vector(1,0,0))*100.0 + VECTOR_RAND(13)
     138  pj->setVelocity(this->getVelocity()+(this->getAbsDir().apply(Vector(1,0,0))*100.0 /*+ VECTOR_RAND(13) */
    139139            /*target->getAbsCoor() - this->getAbsCoor()*/)*.5);//this->getVelocity());
    140  
     140
    141141
    142142  pj->setParent(NullParent::getInstance());
     
    154154void Turret::draw () const
    155155{
    156   /* draw gun body */
    157   glMatrixMode(GL_MODELVIEW);
    158   glPushMatrix();
    159   glTranslatef (this->getAbsCoor ().x,
    160                 this->getAbsCoor ().y,
    161                 this->getAbsCoor ().z);
    162   Vector tmpRot = this->getAbsDir().getSpacialAxis();
    163   glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
     156  if (this->model != NULL)
     157  {
     158    /* draw gun body */
     159    glMatrixMode(GL_MODELVIEW);
     160    glPushMatrix();
     161    glTranslatef (this->getAbsCoor ().x,
     162                  this->getAbsCoor ().y,
     163                  this->getAbsCoor ().z);
     164    Vector tmpRot = this->getAbsDir().getSpacialAxis();
     165    glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    164166
    165   this->model->draw();
    166   glPopMatrix();
     167    this->model->draw();
     168    glPopMatrix();
     169  }
    167170}
    168 
Note: See TracChangeset for help on using the changeset viewer.