From b03e9af027620da96eaee49bc8d2c0f3726efd21 Mon Sep 17 00:00:00 2001 From: Robin Engman Date: Wed, 4 Dec 2013 09:51:48 +0100 Subject: [PATCH] Fixed octree and API Rewrote AddObject function in octree and OnPossibleCollision in PhysocsAPI_Impl --- Code/GamePhysics/Implementation/Octree.cpp | 2 +- Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Code/GamePhysics/Implementation/Octree.cpp b/Code/GamePhysics/Implementation/Octree.cpp index 1da6045b..4da48863 100644 --- a/Code/GamePhysics/Implementation/Octree.cpp +++ b/Code/GamePhysics/Implementation/Octree.cpp @@ -39,7 +39,7 @@ void Octree::AddObject(UniquePointer< ICustomBody > customBodyRef) data.next = NULL; data.prev = NULL; data.customBodyRef = customBodyRef; - this->mapReferences.insert(std::pair (customBodyRef, this->leafData.size())); + this->mapReferences.insert(std::pair (data.customBodyRef, this->leafData.size())); this->leafData.push_back(data); /*if(tempPtr != NULL) diff --git a/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp b/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp index 3d3080da..447a6c68 100644 --- a/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp +++ b/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp @@ -20,7 +20,7 @@ namespace float deltaWhen; Float3 worldWhere; - if( deuter->Intersects(*deuter, 1.0f, deltaWhen, worldWhere) ) + if( proto->Intersects(*deuter, 1.0f, deltaWhen, worldWhere) ) { proto->CallSubscription( proto, deuter ); }