Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9991 in orxonox.OLD for branches/playability/src


Ignore:
Timestamp:
Dec 3, 2006, 5:40:09 PM (18 years ago)
Author:
nicolasc
Message:

rotating TE2, hbolt still not working

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

Legend:

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

    r9989 r9991  
    4646
    4747  this->angle = 0;
    48   this->rotationSpeed = 90;
     48  this->rotationSpeed = 3;
    4949
    5050  this->emitter = new DotEmitter(100, 5, M_2_PI);
     
    135135    this->deactivate();
    136136
    137   //this->updateAngle();
     137  this->updateAngle();
    138138
    139139}
     
    154154void HBolt::draw () //const
    155155{
    156 
    157   glBegin(GL_TRIANGLES);
    158   this->getModel();
    159   glEnd();
    160 
    161156  glPushAttrib(GL_ENABLE_BIT);
    162157  glDisable(GL_LIGHTING);
    163158
    164   //glPushMatrix();
    165   //glRotatef(30, 0.0f, 1.0f, 0.0f);
    166 
    167   //WorldEntity::draw();
    168159  glMatrixMode(GL_MODELVIEW);
    169160  glPushMatrix();
     
    177168  glPopMatrix();*/
    178169
    179   this->updateAngle();
     170  //this->updateAngle();
    180171
    181   float matrix[4][4];
    182172  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
    183   this->getAbsDir().matrix (matrix);
    184   glMultMatrixf((float*)matrix);
    185   glScalef(4.0, 4.0, 4.0);
    186   glRotatef(this->getAngle(), 0.0, 1.0, 0.0);
    187   this->getModel()->draw();
     173  glRotatef(this->angle, 0.0, 0.0, -1.0);
     174  //this->getModel()->draw();
     175  WorldEntity::draw();
    188176  glPopMatrix();
    189177  glPopAttrib();
  • branches/playability/src/world_entities/test_entity2.cc

    r9989 r9991  
    8585
    8686  this->angle = 0;
    87   this->rotationSpeed = 10;
     87  this->rotationSpeed = 3;
    8888
    8989  //this->material->setDiffuseMap("maps/torp2.png");
     
    122122    Vector tmpRot = this->getAbsDir().getSpacialAxis();
    123123    glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    124 
     124    glRotatef(this->angle, 0.0, 0.0, -1.0);
    125125//PRINTF(0)("axis: %f\n", axis);
    126126
     
    240240  glEnd();
    241241
    242   //this->angle += this->rotationSpeed;
    243   glRotatef(this->angle, 0.0, 1.0, 0.0);
    244 
    245242  glPopMatrix();
    246243  glPopAttrib();
Note: See TracChangeset for help on using the changeset viewer.