Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1920 in orxonox.OLD for orxonox/trunk/core/shoot_laser.cc


Ignore:
Timestamp:
Jun 8, 2004, 1:47:33 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: rockets added (in 3D)

File:
1 edited

Legend:

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

    r1919 r1920  
    4747      glPushMatrix();
    4848      glTranslatef(tmpShoot->xCor, tmpShoot->yCor, tmpShoot->zCor);
    49       tmpShoot->xCor+=tmpShoot->xInc;
    50       tmpShoot->yCor+=tmpShoot->yInc;
     49      tmpShoot->xCor+=tmpShoot->xVel;
     50      tmpShoot->yCor+=tmpShoot->yVel;
    5151      glScalef(0.1, 0.1, 0.1);
    5252      glutWireCube(1.0);
     
    113113  shoot* sh = new shoot;
    114114  sh->xCor = x; sh->yCor = y; sh->zCor = z;
    115   sh->xInc = 0; sh->yInc = .4/step; sh->zInc = 0;
     115  sh->xVel = 0; sh->yVel = .4/step; sh->zVel = 0;
    116116  sh->next = lastShoot;
    117117  lastShoot = sh;
     
    119119
    120120void ShootLaser::addShootExt(float x, float y, float z,
    121                              float xInc, float yInc, float zInc)
     121                             float xVel, float yVel, float zVel)
    122122{
    123123  //cout << "ShootLaser::addShootExtended" << endl;
    124124  shoot* sh = new shoot;
    125125  sh->xCor = x; sh->yCor = y; sh->zCor = z;
    126   sh->xInc = xInc/step; sh->yInc = yInc/step; sh->zInc = zInc/step;
     126  sh->xVel = xVel/step; sh->yVel = yVel/step; sh->zVel = zVel/step;
    127127  sh->next = lastShoot;
    128128  lastShoot = sh;
Note: See TracChangeset for help on using the changeset viewer.