X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FWeapons.cpp;h=e948353ce2e322f516f0b7217103247a82527254;hb=c33352410441ce5656f7c65eea696b5f799fefeb;hp=390dbd3bc36d71fb9db1f23ac3b529e965fec336;hpb=36cc3af3e5074215817ddee16defde754e2ad67f;p=lugaru.git diff --git a/Source/Weapons.cpp b/Source/Weapons.cpp index 390dbd3..e948353 100644 --- a/Source/Weapons.cpp +++ b/Source/Weapons.cpp @@ -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,12 +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 ); }