From: Côme Chilliet Date: Thu, 15 Dec 2016 11:07:22 +0000 (+0700) Subject: Removed unused method Checkcollide X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=a389d6c2d7aef7995826f3c20ffe5e5a998d858d;p=lugaru.git Removed unused method Checkcollide --- diff --git a/Source/Objects/Object.cpp b/Source/Objects/Object.cpp index 12c96e5..3a49c9c 100644 --- a/Source/Objects/Object.cpp +++ b/Source/Objects/Object.cpp @@ -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); diff --git a/Source/Objects/Object.hpp b/Source/Objects/Object.hpp index c1e02cc..a6c4f16 100644 --- a/Source/Objects/Object.hpp +++ b/Source/Objects/Object.hpp @@ -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);