Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1919 in orxonox.OLD for orxonox/trunk/core


Ignore:
Timestamp:
Jun 7, 2004, 11:14:21 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: gc modified, player moves with world, collision detection works

Location:
orxonox/trunk/core
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/core/data_tank.cc

    r1856 r1919  
    1919using namespace std;
    2020
     21float DataTank::xOffset = 0;
     22float DataTank::yOffset = 0;
     23float DataTank::zOffset = 0;
    2124
    2225DataTank::DataTank () {}
    23 
    24 
    25 
    2626DataTank::~DataTank () {}
    2727
  • orxonox/trunk/core/data_tank.h

    r1904 r1919  
    1010  ~DataTank ();
    1111
     12  static float xOffset;
     13  static float yOffset;
     14  static float zOffset;
     15
    1216};
    1317
  • orxonox/trunk/core/shoot_laser.cc

    r1900 r1919  
    5757      /* fix2: conditions, that a struct tree can be cut off */
    5858      /* fix3: more efficent and nicer please */
    59       if (tmpShoot->yCor > 20)
     59      if (tmpShoot->yCor - DataTank::yOffset > 20)
    6060        {
    6161          /* normal case: delete one element, link the others */
  • orxonox/trunk/core/world.cc

    r1918 r1919  
    150150{
    151151  glLoadIdentity();
    152   gluLookAt(0.0, -14.0 + primitiveMove, 15.0, 0.0, 0.0 + primitiveMove, 0.0, 0.0, 1.0, 0.0);
     152  gluLookAt(0.0, -14.0 + DataTank::yOffset, 15.0, 0.0, 0.0 + DataTank::yOffset, 0.0, 0.0, 1.0, 0.0);
    153153  /* first draw all players */
    154154  playerList* tmpPlayer = lastPlayer;
     
    167167    }
    168168
    169 
    170   //glPushMatrix();
    171   //glTranslatef(0.0, -primitiveMove, 0.0);
    172169
    173170  /* now draw the rest of the world: environement */
     
    206203  glEnd();
    207204
    208 
    209   primitiveMove+=0.07;
     205  //primitiveMove+=0.07;
     206  DataTank::yOffset += 0.07;
     207
     208  tmpPlayer = lastPlayer;
     209  while( tmpPlayer != null )
     210    {
     211      tmpPlayer->player->yCor += 0.07;
     212      tmpPlayer = tmpPlayer->next;
     213    }
     214
     215 
    210216}
    211217
Note: See TracChangeset for help on using the changeset viewer.