Skip to content

Commit

Permalink
Temporarily removed im3d call from application since it doesn't depen…
Browse files Browse the repository at this point in the history
…d on render, and shouldn't.

Need to solve this some other way.
  • Loading branch information
fLindahl committed Dec 8, 2024
1 parent 245d4db commit 945ac26
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions code/application/game/componentinspection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "util/stringatom.h"
#include "editorstate.h"
#include "core/cvar.h"
#include "dynui/im3d/im3dcontext.h"
//#include "dynui/im3d/im3dcontext.h"
#include "game/world.h"

namespace Game
Expand Down Expand Up @@ -143,16 +143,16 @@ ComponentDrawFuncT<Game::Entity>(Game::Entity owner, ComponentId component, void
}
ImGui::EndGroup();

if (Core::CVarReadInt(cl_draw_entity_references) == 1)
{
if (owner.world == entity->world)
{
Game::Position p0 = world->GetComponent<Position>(owner);
Game::Position p1 = world->GetComponent<Position>(*entity);
Math::line line = Math::line(p0, p1);
Im3d::Im3dContext::DrawLine(line, 1.0f, Math::vec4(0.0f, 1.0f, 0.0f, 1.0f));
}
}
//if (Core::CVarReadInt(cl_draw_entity_references) == 1)
//{
// if (owner.world == entity->world)
// {
// Game::Position p0 = world->GetComponent<Position>(owner);
// Game::Position p1 = world->GetComponent<Position>(*entity);
// Math::line line = Math::line(p0, p1);
// Im3d::Im3dContext::DrawLine(line, 1.0f, Math::vec4(0.0f, 1.0f, 0.0f, 1.0f));
// }
//}
}
if (ImGui::BeginDragDropTarget())
{
Expand Down

0 comments on commit 945ac26

Please sign in to comment.