problem

Hy all i have got problem.
My ship shot very strange, plise help me what i must change and it will shoot normaly
http://www.shrani.si/f/2d/13J/35Uhj9SD/strel.gif
thanks all

That is code:
class metki
{public:
double vx, vy, x, y, r ,strel;
int smer;
// int direction;
metki() {
r = 0.07;
vx=5.55;
vy = 0.55;
// direction = 0;
}
~metki();
void move() {

x=ship->x;
y=ship->y;
smer=ship->direction;
int i=0;
do
{
draw();

// y += cos(smer*PI/180)*0.01;
x+= 0.001;

  i++;

 // Sleep(10);

//preverjanjeali metek trkne ob ladjo;

double dx = Montazna_ladja->ladx - x;
double dy = Montazna_ladja->lady - y;
double ar = Montazna_ladja->ladr + r;
if(dxdx + dydy < ar*ar)
{

ship->reset();
// Montazna_ladja= new montazna_ladja();
}
//glutPostRedisplay();

 }
while(i&lt;750);


/* if (x &gt; (1.0 + r) || x &lt; (-1.0 - r))

x = -x;
if (y > (1.0 + r) || y < (-1.0 - r))
y = -y;

*/

//y+= vy/FPS;
}
void draw() {

glBegin(GL_POLYGON);
glColor3d(0.5, 0.5, 0.5);
glVertex2f(sin((0 + smer)*PI/180)*r+x, cos((0 + smer)*PI/180)*r+y);
glVertex2f(sin((140 + smer)*PI/180)*r+x, cos((140 + smer)*PI/180)*r+y);
glVertex2f(sin((180 + smer)*PI/180)*r/4+x, cos((180 + smer)*PI/180)*r/4+y);
glVertex2f(sin((220 + smer)*PI/180)*r+x, cos((220 + smer)*PI/180)*r+y);
glEnd();
//glClearColor(0, 0, 0, 0);
glBindTexture(GL_TEXTURE_2D,5);

/*
glPushMatrix();
glTranslated(x,y,0);
// glColor1d(1);
glBegin(GL_QUADS);
glTexCoord2d(0,0); glVertex2d(-.05,-.05);
glTexCoord2d(1,0); glVertex2d(+.05,-.05);
glTexCoord2d(1,1); glVertex2d(+.05,+.05);
glTexCoord2d(0,1); glVertex2d(-.05,+.05);
glEnd();
glPopMatrix();
glBindTexture(GL_TEXTURE_2D,0);
*/
}

  };

metki *Metki;

i have got problem.

Yes you have. You have a pile of undocumented crap.
Do you seariously expect someone to workout what you are trying to do in your code - with out comments, explaination or useful variable names?

To be fair, I’m sure those variable names are more useful in whatever language he natively speaks. But he still needs to explain what this code actually does.

Ok i declarate class metki (bullet) in this class i want draw real bullet but i drow onlly
http://www.shrani.si/f/2d/13J/35Uhj9SD/strel.gif
this…
that is very strange
that is move bullet
do
{
draw();

// y += cos(smer*PI/180)*0.01;
x+= 0.001;

i++;

// Sleep(10);

//preverjanjeali metek trkne ob ladjo;

double dx = Montazna_ladja->ladx - x;
double dy = Montazna_ladja->lady - y;
double ar = Montazna_ladja->ladr + r;
if(dxdx + dydy < ar*ar)
{

ship->reset();
// Montazna_ladja= new montazna_ladja();
}
//glutPostRedisplay();

}
while(i<750);

that is deaw my bullet

void draw() {

glBegin(GL_POLYGON);
glColor3d(0.5, 0.5, 0.5);
glVertex2f(sin((0 + smer)*PI/180)*r+x, cos((0 + smer)*PI/180)*r+y);
glVertex2f(sin((140 + smer)*PI/180)*r+x, cos((140 + smer)*PI/180)*r+y);
glVertex2f(sin((180 + smer)*PI/180)*r/4+x, cos((180 + smer)*PI/180)*r/4+y);
glVertex2f(sin((220 + smer)*PI/180)*r+x, cos((220 + smer)*PI/180)*r+y);
glEnd();
//glClearColor(0, 0, 0, 0);
glBindTexture(GL_TEXTURE_2D,5);