git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@134 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2006-01-14 16:57:22 +00:00
parent 2f3175d97e
commit 57dae31c27
8 changed files with 34 additions and 67 deletions
+4 -2
View File
@@ -475,10 +475,12 @@ void rendermd3gun()
float swayupspeed = (float) (sin((float)lastmillis/swayupspeeddiv-90))/(swayupmovediv/10.0f);
//conoutf("%i up %i", swayspeed*1000, swayupspeed*1000);
#define g0(x) ((x) < 0.0f ? -(x) : (x))
float plspeed = max(0.1f, min(1.0f, sqrt(g0(player1->vel.x*player1->vel.x) + g0(player1->vel.y*player1->vel.y))));
// if(plspeed<0.0f) plspeed = -plspeed;
float plspeed = max(0.1f, min(1.0f, sqrt(player1->vel.x*player1->vel.x + player1->vel.y*player1->vel.y)));
swayspeed *= plspeed/2;
swayupspeed *= plspeed/2;
// rotate 90° around z axis