]> git.jsancho.org Git - lugaru.git/commitdiff
Removed unused local vars
authorCôme Chilliet <come@chilliet.eu>
Fri, 25 Nov 2016 13:55:53 +0000 (21:55 +0800)
committerCôme Chilliet <come@chilliet.eu>
Fri, 25 Nov 2016 13:55:53 +0000 (21:55 +0800)
Source/GameTick.cpp
Source/Models.cpp
Source/Person.cpp
Source/Quaternions.cpp
Source/Terrain.cpp
Source/Weapons.cpp
Source/openal_wrapper.cpp

index 4ff12507e57df0ad63d87be1cbbf30ef4351bda3..c994c0f196496894fbeeb95da157e904f333456d 100644 (file)
@@ -3197,7 +3197,6 @@ void doAerialAcrobatics()
 
 void doAttacks()
 {
-    static XYZ relative;
     static int randattack;
     static bool playerrealattackkeydown = 0;
 
index 3aa178ddaf4d39915023559b42a568b150b43384..96149083d797b519bfe11683b805f653bdf4ea94 100644 (file)
@@ -154,7 +154,6 @@ int Model::SphereCheck(XYZ *p1, float radius, XYZ *p, XYZ *move, float *rotate)
     static int firstintersecting;
     static XYZ point;
     static XYZ oldp1;
-    static XYZ start, end;
 
     firstintersecting = -1;
 
@@ -208,7 +207,6 @@ int Model::SphereCheckPossible(XYZ *p1, float radius, XYZ *move, float *rotate)
     static int firstintersecting;
     static XYZ point;
     static XYZ oldp1;
-    static XYZ start, end;
 
     firstintersecting = -1;
 
index 62796aa03a1736d92417ea956130d91df56bed38..87aaace9662be97b5b73a8386b343df4087b94bd 100644 (file)
@@ -609,7 +609,6 @@ bool Person::DoBloodBigWhere(float howmuch, int which, XYZ where)
     static float rotationpoint;
     static int whichtri;
     static XYZ p1, p2, p3, p0;
-    static XYZ N, temp;
     XYZ bary;
     XYZ gxx, gyy;
     float coordsx, coordsy;
@@ -5668,7 +5667,7 @@ void Person::DoStuff()
  */
 void IKHelper(Person *p, float interp)
 {
-    XYZ point, newpoint, change, change2;
+    XYZ point, change, change2;
     float heightleft, heightright;
 
     // TODO: implement localToWorld and worldToLocal
@@ -6245,7 +6244,7 @@ int Person::DrawSkeleton()
                             weapons[i].smallrotation2 = 50;
                         }
                         if ((animCurrent == crouchstabanim && animTarget == crouchstabanim) || (animCurrent == backhandspringanim && animTarget == backhandspringanim)) {
-                            XYZ temppoint1, temppoint2, tempforward;
+                            XYZ temppoint1, temppoint2;
                             float distance;
 
                             temppoint1 = jointPos(righthand);
@@ -6264,7 +6263,7 @@ int Person::DrawSkeleton()
                                 weapons[i].rotation1 = 360 - weapons[i].rotation1;
                         }
                         if ((animCurrent == knifeslashreversalanim && animTarget == knifeslashreversalanim) || (animCurrent == knifeslashreversedanim && animTarget == knifeslashreversedanim)) {
-                            XYZ temppoint1, temppoint2, tempforward;
+                            XYZ temppoint1, temppoint2;
                             float distance;
 
                             temppoint1 = jointPos(righthand);
@@ -6308,7 +6307,7 @@ int Person::DrawSkeleton()
                             weapons[i].rotation3 = 0;
                         }
                         if ((animTarget == swordgroundstabanim && animCurrent == swordgroundstabanim) || (animTarget == swordsneakattackanim && animCurrent == swordsneakattackanim) || (animTarget == swordslashparryanim && animCurrent == swordslashparryanim) || (animTarget == swordslashparriedanim && animCurrent == swordslashparriedanim) || (animTarget == swordslashreversalanim && animCurrent == swordslashreversalanim) || (animTarget == swordslashreversedanim && animCurrent == swordslashreversedanim) || (animTarget == knifeslashreversalanim && animCurrent == knifeslashreversalanim) || (animTarget == knifeslashreversedanim && animCurrent == knifeslashreversedanim) || (animTarget == swordslashanim && animCurrent == swordslashanim) || (animTarget == drawleftanim && animCurrent == drawleftanim) || (animCurrent == backhandspringanim && animTarget == backhandspringanim)) {
-                            XYZ temppoint1, temppoint2, tempforward;
+                            XYZ temppoint1, temppoint2;
                             float distance;
 
                             temppoint1 = animation[animCurrent].position[skeleton.jointlabels[righthand]][frameCurrent] * (1 - target) + animation[animTarget].position[skeleton.jointlabels[righthand]][frameTarget] * (target); //jointPos(righthand);
@@ -6331,7 +6330,7 @@ int Person::DrawSkeleton()
                         weapons[i].smallrotation = 100;
                         weapons[i].smallrotation2 = 0;
                         if ((animTarget == staffhitanim && animCurrent == staffhitanim) || (animTarget == staffhitreversedanim && animCurrent == staffhitreversedanim) || (animTarget == staffspinhitreversedanim && animCurrent == staffspinhitreversedanim) || (animTarget == staffgroundsmashanim && animCurrent == staffgroundsmashanim) || (animTarget == staffspinhitanim && animCurrent == staffspinhitanim)) {
-                            XYZ temppoint1, temppoint2, tempforward;
+                            XYZ temppoint1, temppoint2;
                             float distance;
 
                             temppoint1 = animation[animCurrent].position[skeleton.jointlabels[righthand]][frameCurrent] * (1 - target) + animation[animTarget].position[skeleton.jointlabels[righthand]][frameTarget] * (target); //jointPos(righthand);
index ebea8336faf8fd1391a8721fb2ab14f4bbde0cb7..ff1ad7116b90ba2e73561d65047e53854db5de74 100644 (file)
@@ -280,7 +280,7 @@ bool LineFacet(Vector p1, Vector p2, Vector pa, Vector pb, Vector pc, Vector *p)
 {
     static float d;
     static float denom, mu;
-    static Vector n, pa1, pa2, pa3;
+    static Vector n;
 
     //Calculate the parameters for the plane
     n.x = (pb.y - pa.y) * (pc.z - pa.z) - (pb.z - pa.z) * (pc.y - pa.y);
@@ -392,7 +392,7 @@ bool LineFacet(XYZ p1, XYZ p2, XYZ pa, XYZ pb, XYZ pc, XYZ *p)
 {
     static float d;
     static float denom, mu;
-    static XYZ n, pa1, pa2, pa3;
+    static XYZ n;
 
     //Calculate the parameters for the plane
     n.x = (pb.y - pa.y) * (pc.z - pa.z) - (pb.z - pa.z) * (pc.y - pa.y);
@@ -423,7 +423,7 @@ float LineFacetd(XYZ p1, XYZ p2, XYZ pa, XYZ pb, XYZ pc, XYZ *p)
 {
     static float d;
     static float denom, mu;
-    static XYZ n, pa1, pa2, pa3;
+    static XYZ n;
 
     //Calculate the parameters for the plane
     n.x = (pb.y - pa.y) * (pc.z - pa.z) - (pb.z - pa.z) * (pc.y - pa.y);
@@ -454,7 +454,6 @@ float LineFacetd(XYZ p1, XYZ p2, XYZ pa, XYZ pb, XYZ pc, XYZ n, XYZ *p)
 {
     static float d;
     static float denom, mu;
-    static XYZ pa1, pa2, pa3;
 
     //Calculate the parameters for the plane
     d = - n.x * pa.x - n.y * pa.y - n.z * pa.z;
@@ -480,7 +479,7 @@ float LineFacetd(XYZ *p1, XYZ *p2, XYZ *pa, XYZ *pb, XYZ *pc, XYZ *p)
 {
     static float d;
     static float denom, mu;
-    static XYZ pa1, pa2, pa3, n;
+    static XYZ n;
 
     //Calculate the parameters for the plane
     n.x = (pb->y - pa->y) * (pc->z - pa->z) - (pb->z - pa->z) * (pc->y - pa->y);
@@ -511,7 +510,6 @@ float LineFacetd(XYZ *p1, XYZ *p2, XYZ *pa, XYZ *pb, XYZ *pc, XYZ *n, XYZ *p)
 {
     static float d;
     static float denom, mu;
-    static XYZ pa1, pa2, pa3;
 
     //Calculate the parameters for the plane
     d = - n->x * pa->x - n->y * pa->y - n->z * pa->z;
index 8c0335c8a8872b8f2dd4250be708c56a8c9c0e9d..af56b86150c8deb9a76120fed91add01a81187cd 100644 (file)
@@ -198,7 +198,6 @@ void Terrain::UpdateTransparency(int whichx, int whichy)
 
 void Terrain::UpdateTransparencyother(int whichx, int whichy)
 {
-    static XYZ vertex;
     static int i, j, a, b, c, d, patch_size, stepsize;
 
     patch_size = size / subdivision;
@@ -803,7 +802,7 @@ void Terrain::drawpatchotherother(int whichx, int whichy, float opacity)
 float Terrain::getHeight(float pointx, float pointz)
 {
     static int tilex, tiley;
-    static XYZ startpoint, endpoint, intersect, triangle[3], average;
+    static XYZ startpoint, endpoint, intersect, triangle[3];
 
     pointx /= scale;
     pointz /= scale;
index d876320c51b3608227d6413331d0ac57084da166..7b694a1b69851102a8dd41a466fe2a607a969829 100644 (file)
@@ -117,7 +117,6 @@ void Weapon::DoStuff(int i)
     static XYZ point[3];
     static XYZ closestpoint;
     static XYZ closestswordpoint;
-    static XYZ extramove;
     static float tempmult;
 
     if (owner != -1) {
@@ -174,7 +173,7 @@ void Weapon::DoStuff(int i)
                                 position = colpoint - normalrot * .2;
                             else if (type == staff)
                                 position = colpoint - normalrot * .2;
-                            XYZ temppoint1, temppoint2, tempforward;
+                            XYZ temppoint1, temppoint2;
                             float distance;
 
                             temppoint1 = 0;
@@ -314,7 +313,7 @@ void Weapon::DoStuff(int i)
                 tippoint.z = M[14];
                 glPopMatrix();
                 position -= tippoint * .15;
-                XYZ temppoint1, temppoint2, tempforward;
+                XYZ temppoint1, temppoint2;
 
                 rotation3 = 0;
                 smallrotation = 90;
@@ -350,7 +349,7 @@ void Weapon::DoStuff(int i)
         if (velocity.x != 0 || velocity.z != 0 || velocity.y != 0) {
             velocity.y += gravity * multiplier;
 
-            XYZ temppoint1, temppoint2, tempforward;
+            XYZ temppoint1, temppoint2;
             float distance;
 
             temppoint1 = 0;
@@ -824,7 +823,7 @@ void Weapon::DoStuff(int i)
             tipvelocity.y += gravity * multiplier;
 
             //Rotation
-            XYZ temppoint1, temppoint2, tempforward;
+            XYZ temppoint1, temppoint2;
             float distance;
 
             temppoint1 = position;
index e316da4cea3f066a584888826f482901c699ae5a..0a3d9cb83707022e91132db4b1287ab88050e9ef 100644 (file)
@@ -375,7 +375,6 @@ AL_API OPENAL_SAMPLE *OPENAL_Sample_Load(int index, const char *name_or_data, un
         return NULL;  // this is all the game does...
 
     OPENAL_SAMPLE *retval = NULL;
-    ALuint bufferName = 0;
     ALenum format = AL_NONE;
     ALsizei size = 0;
     ALuint frequency = 0;