X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FWeapons.cpp;h=a7d587fca88a1d2958683a620563d373cd89f4ff;hb=e724a1c4bd1f94b55ac1331bedd32c51eebb08d9;hp=f6cf200fe8d5ef519b3d0222bb62796c292eea38;hpb=2f6f7fe7b9562156a966b6cfd62afb2dc69734f7;p=lugaru.git diff --git a/Source/Weapons.cpp b/Source/Weapons.cpp index f6cf200..a7d587f 100644 --- a/Source/Weapons.cpp +++ b/Source/Weapons.cpp @@ -54,17 +54,17 @@ extern int tutoriallevel; extern int numthrowkill; Model Weapon::throwingknifemodel; -GLuint Weapon::knifetextureptr = 0; -GLuint Weapon::lightbloodknifetextureptr = 0; -GLuint Weapon::bloodknifetextureptr = 0; +Texture Weapon::knifetextureptr; +Texture Weapon::lightbloodknifetextureptr; +Texture Weapon::bloodknifetextureptr; Model Weapon::swordmodel; -GLuint Weapon::swordtextureptr = 0; -GLuint Weapon::lightbloodswordtextureptr = 0; -GLuint Weapon::bloodswordtextureptr = 0; +Texture Weapon::swordtextureptr; +Texture Weapon::lightbloodswordtextureptr; +Texture Weapon::bloodswordtextureptr; Model Weapon::staffmodel; -GLuint Weapon::stafftextureptr = 0; +Texture Weapon::stafftextureptr; Weapon::Weapon(int t, int o) : owner(o) { setType(t); @@ -159,11 +159,11 @@ void Weapon::DoStuff(int i) { int k=terrain.patchobjects[whichpatchx][whichpatchz][j]; start=oldtippoint; end=tippoint; - whichhit=objects.model[k].LineCheck(&start,&end,&colpoint,&objects.position[k],&objects.rotation[k]); + whichhit=objects.model[k].LineCheck(&start,&end,&colpoint,&objects.position[k],&objects.yaw[k]); if(whichhit!=-1) { if(objects.type[k]==treetrunktype){ - objects.model[k].MakeDecal(breakdecal,DoRotation(colpoint-objects.position[k],0,-objects.rotation[k],0),.1,1,Random()%360); - normalrot=DoRotation(objects.model[k].facenormals[whichhit],0,objects.rotation[k],0); + objects.model[k].MakeDecal(breakdecal,DoRotation(colpoint-objects.position[k],0,-objects.yaw[k],0),.1,1,Random()%360); + normalrot=DoRotation(objects.model[k].facenormals[whichhit],0,objects.yaw[k],0); velocity=0; if(type==knife) position=colpoint-normalrot*.1; @@ -214,7 +214,7 @@ void Weapon::DoStuff(int i) { if(velocity.x||velocity.y||velocity.z) { for(int j=0;j