Changeset 1929 in orxonox.OLD
- Timestamp:
- Jun 8, 2004, 11:02:09 PM (20 years ago)
- Location:
- orxonox/trunk/core
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/core/player.cc
r1927 r1929 75 75 void Player::shoot(int n) 76 76 { 77 shootLaser->addShoot(xCor, yCor, zCor); 78 shootLaser->addShootExt(xCor, yCor, zCor, .1, .4, .0); 79 shootLaser->addShootExt(xCor, yCor, zCor, -0.1, .4, .0); 80 shootRocket->addBackParable(xCor, yCor, zCor); 81 shootRocket->addSideAcc(xCor, yCor, zCor, RIGHT); 82 shootRocket->addSideAcc(xCor, yCor, zCor, LEFT); 83 shootRocket->addRotater(xCor, yCor, zCor); 77 if (shootLaser->inhibitor++ >=100) 78 { 79 if (shootLaser->inhibitor++ <= 150) 80 shootLaser->addShoot(xCor, yCor, zCor); 81 else if (shootLaser->inhibitor++ >= 250 && shootLaser->inhibitor <= 300) 82 shootLaser->addShootExt(xCor, yCor, zCor, .1, .4, .0); 83 else if (shootLaser->inhibitor++ >= 350) 84 shootLaser->addShootExt(xCor, yCor, zCor, -0.1, .4, .0); 85 if (shootLaser->inhibitor >=400) 86 shootLaser->inhibitor =0; 87 } 88 if (shootRocket->inhibitor++ >=80) 89 { 90 shootRocket->addBackParable(xCor, yCor, zCor); 91 shootRocket->addSideAcc(xCor, yCor, zCor, RIGHT); 92 shootRocket->addSideAcc(xCor, yCor, zCor, LEFT); 93 shootRocket->addRotater(xCor, yCor, zCor); 94 if (shootRocket->inhibitor >=90) 95 shootRocket->inhibitor =0; 96 } 84 97 //cout << "Player::shoot" << endl; 85 98 } -
orxonox/trunk/core/shoot_laser.cc
r1920 r1929 30 30 lastShoot = null; 31 31 step = 1.0; 32 inhibitor = 0; 32 33 } 33 34 -
orxonox/trunk/core/shoot_laser.h
r1920 r1929 30 30 ~ShootLaser (); 31 31 32 int inhibitor; 33 32 34 void drawShoot(void); 33 35 void addShoot(shoot* sh); -
orxonox/trunk/core/shoot_rocket.cc
r1927 r1929 153 153 sh->next = lastShoot; 154 154 lastShoot = sh; 155 inhibitor =0; 156 } 155 } 157 156 void ShootRocket::addSideAcc(float x, float y, float z, enum RocketDirection direction) 158 157 { … … 173 172 sh->next = lastShoot; 174 173 lastShoot = sh; 175 inhibitor =0; 176 177 } 174 } 175 178 176 void ShootRocket::addRotater(float x, float y, float z) 179 177 { … … 191 189 sh->next = lastShoot; 192 190 lastShoot = sh; 193 inhibitor =0;194 191 } 195 192
Note: See TracChangeset
for help on using the changeset viewer.