*** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@105 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+12
-12
@@ -398,8 +398,8 @@ void loadweapons()
|
||||
};
|
||||
|
||||
void rotatevec(vec &point, vec &rot)
|
||||
{
|
||||
vec tmp(point);
|
||||
{
|
||||
vec tmp(point);
|
||||
|
||||
point.x=tmp.z*sin(rot.x)+tmp.x*cos(rot.x);
|
||||
point.y=tmp.y;
|
||||
@@ -412,10 +412,10 @@ void rotatevec(vec &point, vec &rot)
|
||||
point.x=tmp.y*sin(rot.z)+tmp.x*cos(rot.z);
|
||||
point.y=tmp.y*cos(rot.z)-tmp.x*sin(rot.z);
|
||||
point.z=tmp.z;
|
||||
};
|
||||
|
||||
VAR(swayspeeddiv, 1, 200, 1000);
|
||||
VAR(swaymovediv, 1, 10, 1000);
|
||||
};
|
||||
|
||||
VAR(swayspeeddiv, 1, 200, 1000);
|
||||
VAR(swaymovediv, 1, 10, 1000);
|
||||
|
||||
void rendermd3gun()
|
||||
{
|
||||
@@ -463,15 +463,15 @@ void rendermd3gun()
|
||||
float k_back = kick_back(player1->gunselect)*kick/10;
|
||||
|
||||
vec sway(unitv);
|
||||
int swayt = (lastmillis+1)/10 % 100;
|
||||
float swayspeed = (float) sin((float)lastmillis/swayspeeddiv)/swaymovediv;
|
||||
|
||||
float plspeed = min(1.0f, 0.1f + sqrt(player1->vel.x*player1->vel.x + player1->vel.y*player1->vel.y));
|
||||
int swayt = (lastmillis+1)/10 % 100;
|
||||
float swayspeed = (float) sin((float)lastmillis/swayspeeddiv)/swaymovediv;
|
||||
|
||||
float plspeed = min(1.0f, 0.1f + sqrt(player1->vel.x*player1->vel.x + player1->vel.y*player1->vel.y));
|
||||
swayspeed *= plspeed/2;
|
||||
|
||||
vec rot = {0.0f, 0.0f, 1.0f};
|
||||
vec rot = {0.0f, 0.0f, 1.0f};
|
||||
|
||||
rotatevec(sway, rot);
|
||||
rotatevec(sway, rot);
|
||||
|
||||
sway.x*=swayspeed;
|
||||
sway.y*=swayspeed;
|
||||
|
||||
Reference in New Issue
Block a user