git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@102 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2006-01-08 13:38:30 +00:00
parent 679ba2ef64
commit a2346e9584
19 changed files with 1975 additions and 1917 deletions
+15 -15
View File
@@ -245,25 +245,25 @@ VARF(gamma, 30, 100, 300,
void transplayer()
{
glLoadIdentity();
if(player1->state==CS_DEAD)
{
float t = (lastmillis-player1->lastaction)/1000.0f;
if(t >= 1.6f) t = 1.6f;
if(player1->state==CS_DEAD)
{
float t = (lastmillis-player1->lastaction)/1000.0f;
if(t >= 1.6f) t = 1.6f;
player1->pitch = (float) sin(t)*(-70.0f-player1->oldpitch)+player1->oldpitch;
glRotated(player1->pitch,-1.0,0.0,0.0);
glRotated(player1->yaw,0.0,1.0,0.0);
glTranslated(-player1->o.x, player1->eyeheight-sin(t)*7.0f-player1->o.z, -player1->o.y);
}
else
glTranslated(-player1->o.x, player1->eyeheight-sin(t)*7.0f-player1->o.z, -player1->o.y);
}
else
{
glRotated(player1->roll,0.0,0.0,1.0);
glRotated(player1->pitch,-1.0,0.0,0.0);
glRotated(player1->yaw,0.0,1.0,0.0);
glTranslated(-player1->o.x, (player1->state==CS_DEAD ? player1->eyeheight-0.2f : 0)-player1->o.z, -player1->o.y);
glTranslated(-player1->o.x, (player1->state==CS_DEAD ? player1->eyeheight-0.2f : 0)-player1->o.z, -player1->o.y);
};
};
@@ -295,7 +295,7 @@ void drawhudgun(int w, int h, float aspect, int farplane)
gluPerspective((float)100.0f*h/w, aspect, 0.3f, farplane); // fov fixed at 100°
glMatrixMode(GL_MODELVIEW);
rendermd3gun();
rendermd3gun();
rendermenumdl(); // lazy bastard
glMatrixMode(GL_PROJECTION);
@@ -379,10 +379,10 @@ void gl_drawframe(int w, int h, float changelod, float curfps)
renderentities();
renderspheres(curtime);
renderents();
renderphysents();
renderents();
renderphysents();
rendershotlines();
glDisable(GL_CULL_FACE);