Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1942 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Jun 14, 2004, 1:29:58 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: the changes of Tom wern't that grat… now no more segmentation fault. Also updated the shots to a cooler version

Location:
orxonox/trunk/core
Files:
2 edited

Legend:

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

    r1934 r1942  
    2323using namespace std;
    2424
    25 //Sorry Bensch
    26 #define LEVEL_LENGTH 500
     25
    2726
    2827Environment::Environment ()
    2928{
    3029
    31   //Sorry Bensch: x,y = 10
    32   for (int x = 0; x < 50; x++)
     30
     31  for (int x = 0; x < 10; x++)
    3332    {
    34       for (int y = 0; y < 50; y++)
     33      for (int y = 0; y < 10; y++)
    3534        {
    36           mountainTest[x][y] =0;
     35          mountainTest[x][y] = 0;
    3736                                                 
    3837        }
    3938    }
    40   //Sorry Bensch: x,y = 9
    41   for (int x = 1; x < LEVEL_LENGTH; x++)
     39
     40  for (int x = 1; x < 9; x++)
    4241    {
    43       for (int y = 1; y < LEVEL_LENGTH; y++)
     42      for (int y = 1; y < 9; y++)
    4443        {
    45           //mountainTest[x][y] = (float)random() / 900000000;
    46           mountainTest[x][y] = (float)(random() % 4);                                       
     44          mountainTest[x][y] = (float)random() / 900000000;
     45                                                 
    4746        }
    4847    }
     
    6564 
    6665  glBegin(GL_LINES);
    67   for (int x = 0; x < LEVEL_LENGTH; x += 1)
     66  for (int x = 0; x < 9; x += 1)
    6867    {
    69       for (int y = 0; y < 190; y += 1)
     68      for (int y = 0; y < 9; y += 1)
    7069        {
    7170          glVertex3f((float)(2*x), (float)(2*y), mountainTest[x][y]);
     
    7776 
    7877  glBegin(GL_LINES);
    79   for (int y = 0; y < LEVEL_LENGTH; y += 1)
     78  for (int y = 0; y < 9; y += 1)
    8079    {
    81       for (int x = 0; x < 90; x += 1)
     80      for (int x = 0; x < 9; x += 1)
    8281        {
    8382          glVertex3f((float)(2*x), (float)(2*y), mountainTest[x][y]);
  • orxonox/trunk/core/shoot_rocket.cc

    r1929 r1942  
    183183  sh->type = ROTATER;
    184184  sh->xCor = x+radius*sin(rotateAngle); sh->yCor = y; sh->zCor = z+radius*cos(rotateAngle);
    185   sh->xVel = .1*cos(rotateAngle);
    186   sh->yVel = 0.4;
    187   sh->zVel = .1*sin(rotateAngle);
     185  sh->xVel = .1*cos(rotateAngle)/step;
     186  sh->yVel = 0.4/step;
     187  sh->zVel = .1*sin(rotateAngle)/step;
    188188  sh->xAcc = 1.01; sh->yAcc = 1.01/step; sh->zAcc = 1.01;
    189189  sh->next = lastShoot;
Note: See TracChangeset for help on using the changeset viewer.