Changeset 1921 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Jun 8, 2004, 2:24:24 AM (20 years ago)
- Location:
- orxonox/trunk/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/core/shoot_rocket.cc
r1920 r1921 26 26 27 27 28 ShootRocket::ShootRocket () 28 ShootRocket::ShootRocket () 29 29 { 30 30 lastShoot = null; 31 31 step = 1.0; 32 inhibitor =0; 32 33 } 33 34 … … 113 114 void ShootRocket::addShoot(float x, float y, float z) 114 115 { 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 } 124 130 } 125 131 … … 131 137 sh->xCor = x; sh->yCor = y; sh->zCor = z; 132 138 sh->xVel = xVel/step; sh->yVel = yVel/step; sh->zVel = zVel/step; 133 sh->xAcc = 0; sh->yAcc = .0 5; sh->zAcc = 0;139 sh->xAcc = 0; sh->yAcc = .02; sh->zAcc = 0; 134 140 sh->next = lastShoot; 135 141 lastShoot = sh; -
orxonox/trunk/core/shoot_rocket.h
r1920 r1921 8 8 #include "stdincl.h" 9 9 #include "data_tank.h" 10 #include "npc.h" 10 11 11 12 class ShootRocket { … … 33 34 ShootRocket (); 34 35 ~ShootRocket (); 36 37 int inhibitor; 35 38 36 39 void drawShoot(void);
Note: See TracChangeset
for help on using the changeset viewer.