Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1921 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Jun 8, 2004, 2:24:24 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: missiles are slower, and there are less

Location:
orxonox/trunk/core
Files:
2 edited

Legend:

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

    r1920 r1921  
    2626
    2727
    28 ShootRocket::ShootRocket () 
     28ShootRocket::ShootRocket ()
    2929{
    3030  lastShoot = null;
    3131  step = 1.0;
     32  inhibitor =0;
    3233}
    3334
     
    113114void ShootRocket::addShoot(float x, float y, float z)
    114115{
    115   //cout << "ShootRocket::addShoot" << endl;
    116   shoot* sh = new shoot;
    117   sh->xCor = x; sh->yCor = y; sh->zCor = z;
    118   sh->xVel = -1+(float)random() / 1000000000/step;
    119   sh->yVel = -1/step;
    120   sh->zVel = 1-(float)random() / 1000000000/step;
    121   sh->xAcc = 0; sh->yAcc = .1/step; sh->zAcc = 0;
    122   sh->next = lastShoot;
    123   lastShoot = sh;
     116  inhibitor++;
     117  if (inhibitor >= 10)
     118    {
     119      //cout << "ShootRocket::addShoot" << endl;
     120      shoot* sh = new shoot;
     121      sh->xCor = x; sh->yCor = y; sh->zCor = z;
     122      sh->xVel = (-1+(float)random() / 1000000000/step)/5;
     123      sh->yVel = -.3;
     124      sh->zVel = (1-(float)random() / 1000000000/step)/5;
     125      sh->xAcc = 0; sh->yAcc = .01/step; sh->zAcc = 0;
     126      sh->next = lastShoot;
     127      lastShoot = sh;
     128      inhibitor =0;
     129    }
    124130}
    125131
     
    131137  sh->xCor = x; sh->yCor = y; sh->zCor = z;
    132138  sh->xVel = xVel/step; sh->yVel = yVel/step; sh->zVel = zVel/step;
    133   sh->xAcc = 0; sh->yAcc = .05; sh->zAcc = 0;
     139  sh->xAcc = 0; sh->yAcc = .02; sh->zAcc = 0;
    134140  sh->next = lastShoot;
    135141  lastShoot = sh;
  • orxonox/trunk/core/shoot_rocket.h

    r1920 r1921  
    88#include "stdincl.h"
    99#include "data_tank.h"
     10#include "npc.h"
    1011
    1112class ShootRocket {
     
    3334  ShootRocket ();
    3435  ~ShootRocket ();
     36 
     37  int inhibitor;
    3538
    3639  void drawShoot(void);
Note: See TracChangeset for help on using the changeset viewer.