mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Don't try to draw debug box in non-debug mode
This commit is contained in:
parent
3ea8978c67
commit
ee867fb9dc
1 changed files with 5 additions and 1 deletions
|
@ -20,6 +20,7 @@
|
||||||
#include "Math/Math.h"
|
#include "Math/Math.h"
|
||||||
#include "Scripting/Include/ScriptInterfaceGame.h"
|
#include "Scripting/Include/ScriptInterfaceGame.h"
|
||||||
#include "Sound/sound.h"
|
#include "Sound/sound.h"
|
||||||
|
#include "Specific/winmain.h"
|
||||||
|
|
||||||
using namespace TEN::Collision::Floordata;
|
using namespace TEN::Collision::Floordata;
|
||||||
using namespace TEN::Collision::Point;
|
using namespace TEN::Collision::Point;
|
||||||
|
@ -329,8 +330,11 @@ void TestForObjectOnLedge(ItemInfo* item, CollisionInfo* coll)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TestLaraPosition(const ObjectCollisionBounds& bounds, ItemInfo* item, ItemInfo* laraItem)
|
bool TestLaraPosition(const ObjectCollisionBounds& bounds, ItemInfo* item, ItemInfo* laraItem)
|
||||||
|
{
|
||||||
|
if (DebugMode)
|
||||||
{
|
{
|
||||||
DrawDebugBox(bounds.BoundingBox.ToBoundingOrientedBox(item->Pose), Color(1.0f, 0.0f, 0.0f), RendererDebugPage::CollisionStats);
|
DrawDebugBox(bounds.BoundingBox.ToBoundingOrientedBox(item->Pose), Color(1.0f, 0.0f, 0.0f), RendererDebugPage::CollisionStats);
|
||||||
|
}
|
||||||
|
|
||||||
auto deltaOrient = laraItem->Pose.Orientation - item->Pose.Orientation;
|
auto deltaOrient = laraItem->Pose.Orientation - item->Pose.Orientation;
|
||||||
if (deltaOrient.x < bounds.OrientConstraint.first.x || deltaOrient.x > bounds.OrientConstraint.second.x ||
|
if (deltaOrient.x < bounds.OrientConstraint.first.x || deltaOrient.x > bounds.OrientConstraint.second.x ||
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue