summary refs log tree commit diff
path: root/src/Person.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Person.cpp')
-rw-r--r--src/Person.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/Person.cpp b/src/Person.cpp
index 43aa873..6490658 100644
--- a/src/Person.cpp
+++ b/src/Person.cpp
@@ -24,15 +24,11 @@ extern int psychicaimkey;
 extern int psychickey;
 
 HitStruct 	Person::BulletCollideWithPlayer(int who, XYZ start, XYZ end){
-	float damage=20;
 	XYZ tempbulletloc[2];
 	XYZ collisionpoint;
-	XYZ sparkpos;
 	GLfloat M[16];
 	int collide;
-	float howfar;
 	XYZ average;
-	XYZ facing;
 	int howmany;
 	float distancemax;
 	HitStruct hitstruct;
@@ -198,17 +194,15 @@ void 	Person::DoAnimations(int who){
 	if(target>1&&!skeleton.free){
 		//Footstep sounds
 		if(who==0&&slomo==0&&(targetanimation==joganim||targetanimation==walkanim)&&(targetframe==0||targetframe==8)&&visions==0&&(onground||abs(velocity.y)<1)){
-			int whichsound;
 			float gLoc[3];
 			gLoc[0]=playercoords.x/soundscalefactor;
 			gLoc[1]=playercoords.y/soundscalefactor;
 			gLoc[2]=playercoords.z/soundscalefactor;
-			whichsound=footstepsound+abs(Random())%5;
+			int whichsound = footstepsound+abs(Random())%5;
 			alSourcefv(gSourceID[whichsound], AL_POSITION, gLoc);
 			alSourcePlay(gSourceID[whichsound]);
 		}
 		if(targetanimation==zombieeatanim&&(targetframe==3)){
-			int whichsound;
 			float gLoc[3];
 			XYZ soundpoint=(DoRotation(skeleton.joints[skeleton.jointlabels[head]].position,0,playerrotation,0)+playercoords);
 			gLoc[0]=soundpoint.x/soundscalefactor;
@@ -303,7 +297,6 @@ void 	Person::DoAnimations(int who){
 		XYZ facingdown;
 		XYZ facinghalf;
 		XYZ facingright;
-		int oldanimation=currentanimation;
 		if(who==0){
 			playerrotation2=camera.rotation2;
 			//Facing
@@ -559,22 +552,18 @@ void 	Person::DoAnimations(int who){
 }
 
 void 	Person::DoAnimationslite(int who){
-	
-	int oldanimation=currentanimation;
 	if(target>1&&!skeleton.free){
 		//Footstep sounds
 		if(who==0&&(targetanimation==joganim||targetanimation==walkanim)&&(targetframe==0||targetframe==8)&&visions==0&&(onground||abs(velocity.y)<1)){
-			int whichsound;
 			float gLoc[3];
 			gLoc[0]=playercoords.x/soundscalefactor;
 			gLoc[1]=playercoords.y/soundscalefactor;
 			gLoc[2]=playercoords.z/soundscalefactor;
-			whichsound=footstepsound+abs(Random())%5;
+			int whichsound = footstepsound+abs(Random())%5;
 			alSourcefv(gSourceID[whichsound], AL_POSITION, gLoc);
 			alSourcePlay(gSourceID[whichsound]);
 		}
 		if(targetanimation==zombieeatanim&&(targetframe==3)){
-			int whichsound;
 			float gLoc[3];
 			XYZ soundpoint=(DoRotation(skeleton.joints[skeleton.jointlabels[head]].position,0,playerrotation,0)+playercoords);
 			gLoc[0]=soundpoint.x/soundscalefactor;
@@ -777,7 +766,6 @@ void Person::FindRotationGun(XYZ start, XYZ target)
 extern Model skeletonmodels[10];
 extern Costume costume[2];
 int Person::DrawSkeleton(int who){
-	GLfloat M[16];
 	//Guns
 	if(whichgun==sniperrifle){
 		FindRotationGun(skeleton.joints[skeleton.jointlabels[righthand]].position,skeleton.joints[skeleton.jointlabels[lefthand]].position);