From a389d6c2d7aef7995826f3c20ffe5e5a998d858d Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Thu, 15 Dec 2016 18:07:22 +0700 Subject: [PATCH] Removed unused method Checkcollide --- Source/Objects/Object.cpp | 22 ---------------------- Source/Objects/Object.hpp | 1 - 2 files changed, 23 deletions(-) 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); -- 2.39.5