]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Person.cpp
HUGE refactoring:
[lugaru.git] / Source / Person.cpp
index 388f787891bdefac4cf35e26175a7380f6eef0da..d1ac29f591e27a9b884e11945facdcfa0b4cd8c9 100644 (file)
@@ -6166,23 +6166,6 @@ void     Person::DoStuff(){
                                                                tempcoord+=objects.position[i];
                                                        }
                                                        if(findDistancefastflat(&tempcoord,&objects.position[i])<objects.scale[i]*objects.scale[i]*8&&findDistancefast(&tempcoord,&objects.position[i])<objects.scale[i]*objects.scale[i]*300&&tempcoord.y>objects.position[i].y+3*objects.scale[i]){
-                                                               /*if(onfire){
-                                                               if(!objects.onfire[i]){
-                                                               float gLoc[3];
-                                                               float vel[3];
-                                                               gLoc[0]=objects.position[i].x;
-                                                               gLoc[1]=objects.position[i].y;
-                                                               gLoc[2]=objects.position[i].z;
-                                                               vel[0]=0;
-                                                               vel[1]=0;
-                                                               vel[2]=0;
-                                                               PlaySoundEx( firestartsound, samp[firestartsound], NULL, true);
-                                                               OPENAL_3D_SetAttributes(channels[firestartsound], gLoc, vel);
-                                                               OPENAL_SetVolume(channels[firestartsound], 256);
-                                                               OPENAL_SetPaused(channels[firestartsound], false);
-                                                               objects.onfire[i]=1;
-                                                               }
-                                                               }*/
                                                                if(objects.messedwith[i]<=0){
                                                                        XYZ tempvel;
                                                                        XYZ pos;
@@ -6276,8 +6259,6 @@ void      Person::DoStuff(){
                                                }
                                        }
                                        speechdelay=.3;
-                                       //else if(animation[targetanimation].label[targetframe]==4)whichsound=knifeswishsound;
-                                       //if(animation[targetanimation].label[targetframe]==8)whichsound=landsound2;
 
                                        if(whichsound!=-1){
                                                PlaySoundEx( whichsound, samp[whichsound], NULL, true);
@@ -6449,7 +6430,7 @@ void      Person::DoStuff(){
 
                                        flatfacing=DoRotation(flatfacing,0,rotation,0);
                                        facing=flatfacing;
-                                       ReflectVector(&facing,&terrainnormal);
+                                       ReflectVector(&facing,terrainnormal);
                                        Normalise(&facing);
 
                                        if(isRun()||targetanimation==sneakanim||targetanimation==rollanim||targetanimation==walkanim){
@@ -6502,7 +6483,7 @@ void      Person::DoStuff(){
                                                        velocity*=velspeed;
                                                }
                                                velocity.y+=gravity*multiplier*20;
-                                               ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z));
+                                               ReflectVector(&velocity,terrain.getNormal(coords.x,coords.z));
                                                velspeed=findLength(&velocity);
                                                velocity=flatfacing*velspeed;
                                        }
@@ -6516,7 +6497,7 @@ void      Person::DoStuff(){
                                                                velocity*=velspeed;
                                                        }
                                                        velocity.y+=gravity*multiplier*20;
-                                                       ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z));
+                                                       ReflectVector(&velocity,terrain.getNormal(coords.x,coords.z));
                                                        velspeed=findLength(&velocity);
                                                        if(velspeed<speed*30*scale)velspeed=speed*30*scale;
                                                        velocity=flatfacing*velspeed;
@@ -6540,7 +6521,7 @@ void      Person::DoStuff(){
                                                        }
                                                }
                                                velocity.y+=gravity*multiplier*20;
-                                               ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z));
+                                               ReflectVector(&velocity,terrain.getNormal(coords.x,coords.z));
                                                velspeed=findLength(&velocity);
                                                velocity=flatfacing*velspeed;
                                        }
@@ -6555,7 +6536,7 @@ void      Person::DoStuff(){
                                        velocity*=velspeed;
                                        }
                                        velocity.y+=gravity*multiplier*20;
-                                       ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z));
+                                       ReflectVector(&velocity,terrain.getNormal(coords.x,coords.z));
                                        velspeed=findLength(&velocity);
                                        velocity=flatfacing*velspeed;
                                        }*/
@@ -6569,7 +6550,7 @@ void      Person::DoStuff(){
                                                        velocity*=velspeed;
                                                }
                                                velocity.y+=gravity*multiplier*20;
-                                               ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z));
+                                               ReflectVector(&velocity,terrain.getNormal(coords.x,coords.z));
                                                velspeed=findLength(&velocity);
                                                velocity=flatfacing*velspeed;
                                        }
@@ -6584,7 +6565,7 @@ void      Person::DoStuff(){
                                        velocity*=velspeed;
                                        }
                                        velocity.y+=gravity*multiplier*20;
-                                       ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z));
+                                       ReflectVector(&velocity,terrain.getNormal(coords.x,coords.z));
                                        velspeed=findLength(&velocity);
                                        velocity=flatfacing*velspeed;
                                        }*/
@@ -6598,7 +6579,7 @@ void      Person::DoStuff(){
                                                        velocity*=velspeed;
                                                }
                                                velocity.y+=gravity*multiplier*20;
-                                               ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z));
+                                               ReflectVector(&velocity,terrain.getNormal(coords.x,coords.z));
                                                velspeed=findLength(&velocity);
                                                velocity=flatfacing*velspeed;
                                        }
@@ -6612,7 +6593,7 @@ void      Person::DoStuff(){
                                                        velocity*=velspeed;
                                                }
                                                velocity.y+=gravity*multiplier*20;
-                                               ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z));
+                                               ReflectVector(&velocity,terrain.getNormal(coords.x,coords.z));
                                                velspeed=findLength(&velocity);
                                                velocity=flatfacing*velspeed;
                                        }
@@ -6627,7 +6608,7 @@ void      Person::DoStuff(){
                                                        velocity*=velspeed;
                                                }
                                                velocity.y+=gravity*multiplier*20;
-                                               ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z));
+                                               ReflectVector(&velocity,terrain.getNormal(coords.x,coords.z));
                                                velspeed=findLength(&velocity);
                                                velocity=flatfacing*velspeed*-1;
                                        }
@@ -6641,7 +6622,7 @@ void      Person::DoStuff(){
                                                        velocity*=velspeed;
                                                }
                                                velocity.y+=gravity*multiplier*20;
-                                               ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z));
+                                               ReflectVector(&velocity,terrain.getNormal(coords.x,coords.z));
                                                velspeed=findLength(&velocity);
                                                velocity=DoRotation(flatfacing*velspeed,0,-90,0);
                                        }
@@ -6665,7 +6646,7 @@ void      Person::DoStuff(){
                                                        velocity*=velspeed;
                                                }
                                                velocity.y+=gravity*multiplier*20;
-                                               ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z));
+                                               ReflectVector(&velocity,terrain.getNormal(coords.x,coords.z));
                                                velspeed=findLength(&velocity);
                                                velocity=flatfacing*velspeed*-1;
                                        }
@@ -6679,7 +6660,7 @@ void      Person::DoStuff(){
                                                        velocity*=velspeed;
                                                }
                                                velocity.y+=gravity*multiplier*20;
-                                               ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z));
+                                               ReflectVector(&velocity,terrain.getNormal(coords.x,coords.z));
                                                velspeed=findLength(&velocity);
                                                velocity=flatfacing*velspeed*-1;
                                        }