Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9978 in orxonox.OLD


Ignore:
Timestamp:
Nov 29, 2006, 9:42:37 PM (17 years ago)
Author:
nicolasc
Message:

created bolt.[cc,h], copied from laser, used in light blaster

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

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/WorldEntities.am

    r9975 r9978  
    4141                world_entities/weapons/heavy_blaster.cc \
    4242                \
     43                world_entities/projectiles/bolt.cc \
    4344                world_entities/projectiles/bomb.cc \
    4445                world_entities/projectiles/laser.cc \
  • branches/playability/src/world_entities/test_entity2.cc

    r9977 r9978  
    8484  this->material->setAmbient(1.0, 0.0, 1.0);
    8585
    86 //   this->material->setDiffuseMap("maps/");
     86  //this->material->setDiffuseMap("maps/torp2.png");
    8787}
    8888
     
    113113
    114114//PRINTF(0)("axis: %f\n", axis);
    115 
     115    glDisable(GL_TEXTURE_2D);
    116116    this->material->select();
    117117
    118118  glColor3f(0.0, 1.0, 0.0);
     119  glBindTexture( GL_TEXTURE_2D, 1 );
     120  glBegin(GL_QUADS); // +X
     121    glTexCoord2f (0.0, 0.0);
     122    glVertex3f( 0.0f, -0.5f, -0.5f);
     123    glNormal3f(1.0, 0.0, 0.0);
     124
     125    glTexCoord2f (1.0, 0.0);
     126    glVertex3f( 0.0f, -0.5f , 0.5f);
     127    glNormal3f(1.0, 0.0, 0.0);
     128
     129    glTexCoord2f (1.0, 1.0);
     130    glVertex3f( 0.0, 0.5f , 0.5f );
     131    glNormal3f(1.0, 0.0, 0.0);
     132
     133
     134    glTexCoord2f (0.0, 1.0);
     135    glVertex3f( 0.0, 0.5f, -0.5f );
     136    glNormal3f(1.0, 0.0, 0.0);
     137  glEnd();
     138
     139  glBegin(GL_QUADS); // +Y
     140    glTexCoord2f (0.0, 0.0);
     141    glVertex3f(-0.5f, 0.0f, -0.5f);
     142    glNormal3f(0.0, 1.0, 0.0);
     143
     144    glTexCoord2f (1.0, 0.0);
     145    glVertex3f(-0.5f, 0.0f , 0.5f);
     146    glNormal3f(0.0, 1.0, 0.0);
     147
     148    glTexCoord2f (1.0, 1.0);
     149    glVertex3f( 0.5f, 0.0f , 0.5f );
     150    glNormal3f(0.0, 1.0, 0.0);
     151
     152    glTexCoord2f (0.0, 1.0);
     153    glVertex3f( 0.5f, 0.0f, -0.5f );
     154    glNormal3f(0.0, 1.0, 0.0);
     155  glEnd();
     156
     157  glBegin(GL_QUADS);// +Z
     158    glTexCoord2f (0.0, 0.0);
     159    glVertex3f(-0.5f, -0.5f, 0.0f);
     160    glNormal3f(0.0, 0.0, 1.0);
     161
     162    glTexCoord2f (1.0, 0.0);
     163    glVertex3f(-0.5f, 0.5f , 0.0f);
     164    glNormal3f(0.0, 0.0, 1.0);
     165
     166    glTexCoord2f (1.0, 1.0);
     167    glVertex3f( 0.5f, 0.5f , 0.0f );
     168    glNormal3f(0.0, 0.0, 1.0);
     169
     170    glTexCoord2f (0.0, 1.0);
     171    glVertex3f( 0.5f, -0.5f, 0.0f );
     172    glNormal3f(0.0, 0.0, 1.0);
     173  glEnd();
    119174
    120175  glBegin(GL_QUADS);
    121 
    122     glVertex3f( 0.0f, -10.0f, 0.0f);
    123     glNormal3f(1.0, 0.0, 0.0);
    124 //     glTexCoord2f(1.0f, 1.0f);
    125 
    126     glVertex3f( 0.0f,  -10.0f , 20.0f);
    127     glNormal3f(1.0, 0.0, 0.0);
    128 
    129 
    130 //     glTexCoord2f(0.0f, 1.0f);
    131 
    132     glVertex3f( 0.0,  10.0f , 20.0f );
    133     glNormal3f(1.0, 0.0, 0.0);
    134 
    135 
    136 //     glTexCoord2f(0.0f, 0.0f);
    137 
    138     glVertex3f( 0.0, 10.0f, 0.0f );
    139     glNormal3f(1.0, 0.0, 0.0);
    140 
    141 
    142 //     glTexCoord2f(1.0f, 0.0f);
    143 
     176    glTexCoord2f (0.0, 0.0);
     177    glVertex3f( 0.0f, -0.5f, -0.5f);
     178    glNormal3f(-1.0, 0.0, 0.0);
     179
     180    glTexCoord2f (1.0, 0.0);
     181    glVertex3f( 0.0f, 0.5f , -0.5f);
     182    glNormal3f(-1.0, 0.0, 0.0);
     183
     184    glTexCoord2f (1.0, 1.0);
     185    glVertex3f( 0.0, 0.5f , 0.5f );
     186    glNormal3f(-1.0, 0.0, 0.0);
     187
     188    glTexCoord2f (0.0, 1.0);
     189    glVertex3f( 0.0, -0.5f, 0.5f );
     190    glNormal3f(-1.0, 0.0, 0.0);
     191  glEnd();
     192
     193  glBegin(GL_QUADS);
     194    glTexCoord2f (0.0, 0.0);
     195    glVertex3f(-0.5f, 0.0f, -0.5f);
     196    glNormal3f(0.0, -1.0, 0.0);
     197
     198    glTexCoord2f (1.0, 0.0);
     199    glVertex3f(0.5f, 0.0f , -0.5f);
     200    glNormal3f(0.0, -1.0, 0.0);
     201
     202    glTexCoord2f (1.0, 1.0);
     203    glVertex3f( 0.5f, 0.0f , 0.5f );
     204    glNormal3f(0.0, -1.0, 0.0);
     205
     206    glTexCoord2f (0.0, 1.0);
     207    glVertex3f( -0.5f, 0.0f, 0.5f );
     208    glNormal3f(0.0, -1.0, 0.0);
     209  glEnd();
     210
     211  glBegin(GL_QUADS);
     212    glTexCoord2f (0.0, 0.0);
     213    glVertex3f(-0.5f, -0.5f, 0.0f);
     214    glNormal3f(0.0, 0.0, -1.0);
     215
     216    glTexCoord2f (1.0, 0.0);
     217    glVertex3f(0.5f, -0.5f , 0.0f);
     218    glNormal3f(0.0, 0.0, -1.0);
     219
     220    glTexCoord2f (1.0, 1.0);
     221    glVertex3f( 0.5f, 0.5f , 0.0f );
     222    glNormal3f(0.0, 0.0, -1.0);
     223
     224    glTexCoord2f (0.0, 1.0);
     225    glVertex3f( -0.5f, 0.5f, 0.0f );
     226    glNormal3f(0.0, 0.0, -1.0);
    144227  glEnd();
    145228
  • branches/playability/src/world_entities/weapons/light_blaster.cc

    r9975 r9978  
    6565
    6666  this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL | WTYPE_LIGHT);
    67   this->setProjectileTypeC("RailProjectile");   // FIXME temp project type until the blaste class exist
     67  //this->setProjectileTypeC("RailProjectile");   // FIXME temp project type until the blaste class exist
     68  this->setProjectileTypeC("Bolt");   // Working; FIXME: add textures
    6869  this->prepareProjectiles(100);
    6970
Note: See TracChangeset for help on using the changeset viewer.