]> git.jsancho.org Git - lugaru.git/commitdiff
Removed unused method Checkcollide
authorCôme Chilliet <come@chilliet.eu>
Thu, 15 Dec 2016 11:07:22 +0000 (18:07 +0700)
committerCôme Chilliet <come@chilliet.eu>
Thu, 15 Dec 2016 11:07:22 +0000 (18:07 +0700)
Source/Objects/Object.cpp
Source/Objects/Object.hpp

index 12c96e5fda4fe8e8e09f89bf0c5acd3774e29251..3a49c9c43e16d821a70dda19aa4e13d3434fa1a3 100644 (file)
@@ -744,28 +744,6 @@ void Object::AddObjectsToTerrain()
     }
 }
 
-bool Object::Checkcollide(XYZ startpoint, XYZ endpoint, int which)
-{
-    static XYZ colpoint, colviewer, coltarget;
-    static int i;
-
-    startpoint.y += .1;
-    endpoint.y += .1;
-    startpoint.y -= .1;
-    endpoint.y -= .1;
-
-    for (i = 0; i < objects.size(); i++) {
-        if (objects[i]->type != treeleavestype && objects[i]->type != treetrunktype && objects[i]->type != bushtype && objects[i]->type != firetype && i != which) {
-            colviewer = startpoint;
-            coltarget = endpoint;
-            if (objects[i]->model.LineCheck(&colviewer, &coltarget, &colpoint, &objects[i]->position, &objects[i]->yaw) != -1)
-                return 1;
-        }
-    }
-
-    return 0;
-}
-
 void Object::SphereCheckPossible(XYZ *p1, float radius)
 {
     int whichpatchx = p1->x / (terrain.size / subdivision * terrain.scale);
index c1e02cc7dfbe8e0c6df4898661e64971085216cb..a6c4f16a64ef921e9437e65970f8b563b6289907 100644 (file)
@@ -90,7 +90,6 @@ public:
 
     static void ComputeCenter();
     static void ComputeRadius();
-    static bool Checkcollide(XYZ startpoint, XYZ endpoint, int which);
     static void AddObjectsToTerrain();
     static void LoadObjectsFromFile(FILE* tfile, bool skip);
     static void SphereCheckPossible(XYZ *p1, float radius);