Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10645 in orxonox.OLD


Ignore:
Timestamp:
May 2, 2007, 11:48:16 PM (17 years ago)
Author:
nicolasc
Message:

minor cleanup

Location:
branches/vs-enhencements/src
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/vs-enhencements/src/util/track/action_box.cc

    r10642 r10645  
    127127bool ActionBox::isPointInBox( const Vector & pos )
    128128{
    129   bool result = true;
     129  bool result = true; //TODO remove
    130130  for ( int i = 0; i<6; i++ )
    131131  {
    132132    if ( planes[i].distancePoint( pos ) < 0 )
    133133    {
    134       result = false;
     134      result = false; // TODO return false;
    135135      printf("PLANE %i FAILED %f\n", i, planes[i].distancePoint( pos ) );
    136136    }
    137137  }
    138  
    139   return result;
     138  return result;  //TODO return true;
    140139}
    141140
     
    146145{
    147146  Vector p[7];
    148  
     147
    149148  p[0] = Vector( 0.0, height_2, -width_2 );
    150149  p[1] = Vector( 0.0, height_2, width_2 );
     
    154153  p[5] = Vector( depth, -height_2, width_2 );
    155154  p[6] = Vector( depth, -height_2, -width_2 );
    156  
     155
    157156  for ( int i = 0; i<7; i++ )
    158157  {
     
    160159    p[i] += track->getTrackNode()->getAbsCoor();
    161160  }
    162  
     161
    163162  planes[0] = Plane( p[1], p[0], p[2] );
    164163  planes[1] = Plane( p[3], p[4], p[5] );
  • branches/vs-enhencements/src/world_entities/WorldEntities.am

    r10641 r10645  
    4949                world_entities/projectiles/spike.cc \
    5050                world_entities/projectiles/acid_splash.cc \
     51                world_entities/projectiles/plasma_pulse.cc \
    5152                \
    5253                world_entities/projectiles/projectile_weapon.cc \
     
    202203                projectiles/spike_ball.h \
    203204                projectiles/acid_splash.h \
    204                 \
     205                projectiles/plasma_pulse.h \
     206               \
    205207                projectiles/projectile_weapon.h \
    206208                projectiles/spike_ball.h \
  • branches/vs-enhencements/src/world_entities/effects/billboard.cc

    r10635 r10645  
    125125  if (this->angle > M_2_PI)
    126126    this->angle -= M_2_PI;
     127//   curMagnitude = updatePulse(this->angle);
    127128}
    128129
     
    159160  float tmp = 1;
    160161  if (this->bPulse)
    161     tmp += this->pulseMagnitude * updatePulse(this->angle);
     162    tmp += this->pulseMagnitude * sinf(this->angle); //updatePulse(this->angle);
    162163
    163164  v *= sizeX * tmp;
  • branches/vs-enhencements/src/world_entities/effects/billboard.h

    r10635 r10645  
    2626    void colorTexture(const Color col);
    2727
     28    //!< Pulsing Capability, changes size of the grid
    2829    inline void togglePluse () {this->bPulse = !bPulse; };
    2930    inline void setPulse () { this->bPulse = true; };
     
    4950    bool bPulse;
    5051    float pulseMagnitude;
     52    float curMagnitude;
    5153    float angle;
    5254    float angularSpeed;
  • branches/vs-enhencements/src/world_entities/projectiles/hbolt.cc

    r10618 r10645  
    5959  this->halo = new Billboard();
    6060  this->halo->setSize(.65, .65);
    61   this->halo->setTexture("hbolt_halo2.png");
     61  this->halo->setTexture("hbolt_halo2.jpg");
    6262  this->halo->setVisibility(false);
    6363
     
    177177  glPushAttrib(GL_ENABLE_BIT);
    178178  glDisable(GL_LIGHTING);
    179 //   glDisable(GL_FOG);
     179  glDisable(GL_FOG);
    180180
    181181  glMatrixMode(GL_MODELVIEW);
     
    184184//     float matrix[4][4];
    185185    glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
     186    this->halo->draw();
     187
    186188    Vector tmpRot = this->getAbsDir().getSpacialAxis();
    187189    glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
     
    189191//     glMultMatrixf((float*)matrix);
    190192    this->getModel()->draw();
    191     this->halo->draw();
    192193
    193194  glPopMatrix();
  • branches/vs-enhencements/src/world_entities/projectiles/lbolt.cc

    r10635 r10645  
    6262  this->halo = new Billboard();
    6363  this->halo->setSize(.35, .35);
    64   this->halo->setTexture("hbolt_halo.png");
     64  this->halo->setTexture("hbolt_halo.jpg");
    6565  this->halo->setVisibility(false);
    6666
  • branches/vs-enhencements/src/world_entities/weapons/heavy_blaster.cc

    r10644 r10645  
    9898//  this->model = (Model*)ResourceManager::getInstance()->load("models/guns/test_gun.obj", OBJ, RP_CAMPAIGN);
    9999
    100   this->loadModel("models/guns/frag_cannon.obj", .4);
     100  this->loadModel("models/guns/frag_cannon2.obj", .4);
    101101
    102102
  • branches/vs-enhencements/src/world_entities/weapons/light_blaster.cc

    r10644 r10645  
    5353{
    5454
    55 //   for (int i = 0; i < this->getBarrels(); i++)
    56 //   {
    57 //    //delete [] this->shootAnim[i];
    58 //    delete [] this->objComp[i];
    59 //   }
    60 //   delete [] this->emissionPoint;
    61 //    //delete [] this->shootAnim;
    62 //    delete [] this->objComp;
     55  for (int i = 0; i < this->getBarrels(); i++)
     56  {
     57   //delete [] this->shootAnim[i];
     58   delete [] this->objComp[i];
     59  }
     60  delete [] this->emissionPoint;
     61   //delete [] this->shootAnim;
     62   delete [] this->objComp;
    6363
    6464}
  • branches/vs-enhencements/src/world_entities/weapons/rf_cannon.cc

    r10644 r10645  
    5252RFCannon::~RFCannon()
    5353{
    54 //   for (int i = 0; i < this->getBarrels(); i++)
    55 //     delete [] this->objComp[i];
     54  for (int i = 0; i < this->getBarrels(); i++)
     55    delete [] this->objComp[i];
    5656
    57 //   delete [] this->emissionPoint;
    58 //   delete [] this->objComp;
     57  delete [] this->emissionPoint;
     58  delete [] this->objComp;
    5959}
    6060
     
    6767{
    6868
    69   this->loadModel("models/guns/rf_cannon.obj", 0.3);
     69  this->loadModel("models/guns/rf_cannon.obj", 0.2);
    7070
    7171
     
    8282
    8383  this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL | WTYPE_LIGHT);
    84   this->setProjectileTypeC("LBolt");
     84  this->setProjectileTypeC("PlasmaPulse");
    8585  this->prepareProjectiles(100);
    8686
     
    122122void RFCannon::fire()
    123123{
    124   for (int i = 0; i < this->getBarrels(); i++){
     124//   for (int i = 0; i < this->getBarrels(); i++){
    125125    Projectile* pj =  this->getProjectile();
    126126    if (pj == NULL)
     
    139139
    140140    this->activeBarrel = (this->activeBarrel + 1) % this->getBarrels();
    141   }
     141//   }
    142142}
    143143
  • branches/vs-enhencements/src/world_entities/weapons/weapon.cc

    r10529 r10645  
    163163 * needed, if there are more than one barrel or segments
    164164 */
     165/*
    165166void Weapon::init2()
    166167{
     
    182183    this->shootAnim[i] = new Animation3D* [this->segs];
    183184  }
    184 }
     185}*/
    185186
    186187/**
    187188 * deconstructor for init2
    188189 */
     190/*
    189191void Weapon::deconstr()
    190192{
     
    198200  delete this->emissionPoint;
    199201  delete this->shootAnim;
    200 }
     202}*/
    201203
    202204/**
  • branches/vs-enhencements/src/world_entities/weapons/weapon.h

    r10516 r10645  
    181181    inline void setSegs(int segs) { this->segs = segs; };
    182182
    183     inline Animation3D* getShootAnim(int barrel, int seg) { return this->shootAnim[barrel][seg]; };
    184     inline void setShootAnim(int barrel, int seg, PNode* component) { this->shootAnim[barrel][seg] = this->getAnimation(barrel, seg, component); };
    185 
    186     void init2();
     183//     inline Animation3D* getShootAnim(int barrel, int seg) { return this->shootAnim[barrel][seg]; };
     184//     inline void setShootAnim(int barrel, int seg, PNode* component) { this->shootAnim[barrel][seg] = this->getAnimation(barrel, seg, component); };
     185
     186//     void init2();
    187187    void deconstr();
    188188
Note: See TracChangeset for help on using the changeset viewer.