- Timestamp:
- Jun 8, 2004, 1:47:33 AM (20 years ago)
- Location:
- orxonox/trunk/core
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/core/Makefile
r1904 r1920 29 29 orxonox.h \ 30 30 data_core.h 31 31 32 32 SOURCES = \ 33 33 orxonox.cc \ … … 43 43 environment.o \ 44 44 shoot_laser.o \ 45 shoot_rocket.o \ 45 46 ai.o 46 47 … … 75 76 @echo "" 76 77 @echo "For further info see the README file" 77 78 78 79 clean: 79 80 rm -rf *.o *~ orxonox … … 87 88 #data_tank.o: data_tank.cc \ 88 89 # data_tank.h 89 90 90 91 #EOF -
orxonox/trunk/core/player.cc
r1900 r1920 19 19 #include "player.h" 20 20 #include <iostream> 21 #include <stdlib.h> 21 22 22 23 … … 28 29 xCor = yCor = zCor = 0; 29 30 shootLaser = new ShootLaser; 31 shootRocket = new ShootRocket; 30 32 } 31 33 … … 76 78 shootLaser->addShootExt(xCor, yCor, zCor, .1, .4, .0); 77 79 shootLaser->addShootExt(xCor, yCor, zCor, -0.1, .4, .0); 80 shootRocket->addShoot(xCor, yCor, zCor); 78 81 //cout << "Player::shoot" << endl; 79 82 } … … 92 95 /* draw all the shoots additionaly */ 93 96 shootLaser->drawShoot(); 97 shootRocket->drawShoot(); 94 98 //cout << "Player::drawPlayer" << endl; 95 99 } -
orxonox/trunk/core/player.h
r1904 r1920 7 7 8 8 #include "shoot_laser.h" 9 #include "shoot_rocket.h" 9 10 #include "data_tank.h" 10 11 … … 24 25 /* this player wanna shoot? so include a ref to ShootLaser */ 25 26 ShootLaser* shootLaser; 27 ShootRocket* shootRocket; 26 28 27 29 void setPosition(float x, float y, float z); -
orxonox/trunk/core/shoot_laser.cc
r1919 r1920 47 47 glPushMatrix(); 48 48 glTranslatef(tmpShoot->xCor, tmpShoot->yCor, tmpShoot->zCor); 49 tmpShoot->xCor+=tmpShoot->x Inc;50 tmpShoot->yCor+=tmpShoot->y Inc;49 tmpShoot->xCor+=tmpShoot->xVel; 50 tmpShoot->yCor+=tmpShoot->yVel; 51 51 glScalef(0.1, 0.1, 0.1); 52 52 glutWireCube(1.0); … … 113 113 shoot* sh = new shoot; 114 114 sh->xCor = x; sh->yCor = y; sh->zCor = z; 115 sh->x Inc = 0; sh->yInc = .4/step; sh->zInc= 0;115 sh->xVel = 0; sh->yVel = .4/step; sh->zVel = 0; 116 116 sh->next = lastShoot; 117 117 lastShoot = sh; … … 119 119 120 120 void ShootLaser::addShootExt(float x, float y, float z, 121 float x Inc, float yInc, float zInc)121 float xVel, float yVel, float zVel) 122 122 { 123 123 //cout << "ShootLaser::addShootExtended" << endl; 124 124 shoot* sh = new shoot; 125 125 sh->xCor = x; sh->yCor = y; sh->zCor = z; 126 sh->x Inc = xInc/step; sh->yInc = yInc/step; sh->zInc = zInc/step;126 sh->xVel = xVel/step; sh->yVel = yVel/step; sh->zVel = zVel/step; 127 127 sh->next = lastShoot; 128 128 lastShoot = sh; -
orxonox/trunk/core/shoot_laser.h
r1904 r1920 20 20 float yCor; 21 21 float zCor; 22 float x Inc;23 float y Inc;24 float z Inc;22 float xVel; 23 float yVel; 24 float zVel; 25 25 float collisionRadius; 26 26 }; … … 33 33 void addShoot(shoot* sh); 34 34 void addShoot(float x, float y, float z); 35 void addShootExt(float x, float y, float z, float x Inc, float yInc, float zInc);35 void addShootExt(float x, float y, float z, float xVel, float yVel, float zVel); 36 36 void setShootStep(float step); 37 37 void removeShoot(shoot* sh); -
orxonox/trunk/core/world.h
r1917 r1920 12 12 #include "environment.h" 13 13 #include "shoot_laser.h" 14 #include "shoot_rocket.h" 14 15 #include "stdincl.h" 15 16 #include "data_tank.h"
Note: See TracChangeset
for help on using the changeset viewer.