]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Weapons.cpp
Fixed resolution selection and added 1920x1200 mode for my monitor. :)
[lugaru.git] / Source / Weapons.cpp
index ac7a96f650fa92ab2edff2372809ee461dce098b..e948353ce2e322f516f0b7217103247a82527254 100644 (file)
@@ -670,7 +670,7 @@ void        Weapons::DoStuff(){
                                                else velocity[i]=0;
                                                if(terrain.getOpacity(position[i].x,position[i].z)<.2)velocity[i]+=bounceness*elasticity*.3;
                                                else velocity[i]+=bounceness*elasticity;
-
+//if (type[i]==knife) printf("velocity of knife %d now %f,%f,%f.\n", i, velocity[i].x, velocity[i].y, velocity[i].z);
                                                if(findLengthfast(&bounceness)>1){
                                                        float gLoc[3];
                                                        float vel[3];
@@ -723,6 +723,7 @@ void        Weapons::DoStuff(){
                                                else tipvelocity[i]=0;
                                                if(terrain.getOpacity(tippoint[i].x,tippoint[i].z)<.2)tipvelocity[i]+=bounceness*elasticity*.3;
                                                else tipvelocity[i]+=bounceness*elasticity;
+//if (type[i]==knife) printf("tipvelocity of knife %d now %f,%f,%f.\n", i, tipvelocity[i].x, tipvelocity[i].y, tipvelocity[i].z);
 
                                                if(findLengthfast(&bounceness)>1){
                                                        float gLoc[3];
@@ -1333,11 +1334,12 @@ Weapons::Weapons()
 
 Weapons::~Weapons()
 {
-       if (stafftextureptr) glDeleteTextures( 1, (const unsigned long *)&stafftextureptr );
-       if (knifetextureptr) glDeleteTextures( 1, (const unsigned long *)&knifetextureptr );
-       if (lightbloodknifetextureptr) glDeleteTextures( 1, (const unsigned long *)&lightbloodknifetextureptr );
-       if (bloodknifetextureptr) glDeleteTextures( 1, (const unsigned long *)&bloodknifetextureptr );
-       if (swordtextureptr) glDeleteTextures( 1, (const unsigned long *)&swordtextureptr );
-       if (lightbloodswordtextureptr) glDeleteTextures( 1, (const unsigned long *)&lightbloodswordtextureptr );
-       if (bloodswordtextureptr) glDeleteTextures( 1, (const unsigned long *)&bloodswordtextureptr );
+       if (stafftextureptr) glDeleteTextures( 1, &stafftextureptr );
+       if (knifetextureptr) glDeleteTextures( 1, &knifetextureptr );
+       if (lightbloodknifetextureptr) glDeleteTextures( 1, &lightbloodknifetextureptr );
+       if (bloodknifetextureptr) glDeleteTextures( 1, &bloodknifetextureptr );
+       if (swordtextureptr) glDeleteTextures( 1, &swordtextureptr );
+       if (lightbloodswordtextureptr) glDeleteTextures( 1, &lightbloodswordtextureptr );
+       if (bloodswordtextureptr) glDeleteTextures( 1, &bloodswordtextureptr );
 }
+