Changeset 1957 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Jun 16, 2004, 9:43:10 AM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/orxonox.cc
r1956 r1957 138 138 io->setPlayerStep(19.2/fps); /* set player to propper speed */ 139 139 localPlayer->shootLaser->setShootStep(20.0/fps); /* set shoot speed */ 140 localPlayer->shootRocket->setShootStep(20.0/fps); /* set shoot speed */ 140 141 world->setWorldStep(7.0/fps); /* set the speed of the terrain moving away */ 141 142 fps = 0; -
orxonox/trunk/src/player.cc
r1956 r1957 75 75 void Player::shoot(int n) 76 76 { 77 if (shootLaser->inhibitor++ <= 100)77 // if (shootLaser->inhibitor++ <= 100) 78 78 shootLaser->addShoot(xCor, yCor, zCor); 79 else if (shootLaser->inhibitor++ <= 200)79 // else if (shootLaser->inhibitor++ <= 200) 80 80 shootLaser->addShootExt(xCor, yCor, zCor, .1, .4, .0); 81 else if (shootLaser->inhibitor++ <= 300)81 // else if (shootLaser->inhibitor++ <= 300) 82 82 shootLaser->addShootExt(xCor, yCor, zCor, -0.1, .4, .0); 83 else83 // else 84 84 shootLaser->inhibitor =0; 85 85 86 if (shootRocket->inhibitor++ >=80)86 // if (shootRocket->inhibitor++ >=80) 87 87 { 88 88 shootRocket->addBackParable(xCor, yCor, zCor); … … 90 90 shootRocket->addSideAcc(xCor, yCor, zCor, LEFT); 91 91 shootRocket->addRotater(xCor, yCor, zCor); 92 if (shootRocket->inhibitor >=90)93 shootRocket->inhibitor =0;92 // if (shootRocket->inhibitor >=90) 93 // shootRocket->inhibitor =0; 94 94 } 95 95 //cout << "Player::shoot" << endl; -
orxonox/trunk/src/shoot_rocket.cc
r1956 r1957 49 49 glPushMatrix(); 50 50 glTranslatef(tmpShoot->xCor, tmpShoot->yCor, tmpShoot->zCor); 51 tmpShoot->age+=step; 51 52 switch (tmpShoot->type) 52 53 { … … 89 90 /* fix2: conditions, that a struct tree can be cut off */ 90 91 /* fix3: more efficent and nicer please */ 91 if (tmpShoot-> yCor - DataTank::yOffset > 20)92 if (tmpShoot->age > tmpShoot->lifetime) 92 93 { 93 94 /* normal case: delete one element, link the others */ … … 151 152 sh->zVel = (1-(float)rand() / 1000000000/step)/5; 152 153 sh->xAcc = 0; sh->yAcc = .01/step; sh->zAcc = 0; 154 sh->age=0; 155 sh->lifetime=5; 153 156 sh->next = lastShoot; 154 157 lastShoot = sh; … … 170 173 } 171 174 sh->xAcc = .9; sh->yAcc = .02; sh->zAcc = 0; 175 sh->age=0; 176 sh->lifetime=10; 172 177 sh->next = lastShoot; 173 178 lastShoot = sh; … … 183 188 sh->type = ROTATER; 184 189 sh->xCor = x+radius*sin(rotateAngle); sh->yCor = y; sh->zCor = z+radius*cos(rotateAngle); 185 sh->xVel = .1*cos(rotateAngle)/step; 186 sh->yVel = 0.4/step; 187 sh->zVel = .1*sin(rotateAngle)/step; 188 sh->xAcc = 1.01; sh->yAcc = 1.01/step; sh->zAcc = 1.01; 190 sh->xVel = 1*cos(rotateAngle)*step; 191 sh->yVel = 4*step; 192 sh->zVel = 1*sin(rotateAngle)*step; 193 sh->xAcc = 1.01; sh->yAcc = 1- step; sh->zAcc = 1.01; 194 sh->age=0; 195 sh->lifetime=10; 189 196 sh->next = lastShoot; 190 197 lastShoot = sh; -
orxonox/trunk/src/shoot_rocket.h
r1956 r1957 33 33 float zAcc; 34 34 float age; 35 float lifetime; 35 36 float collisionRadius; 36 37 };
Note: See TracChangeset
for help on using the changeset viewer.