Skip to content

Commit

Permalink
GameObjectsDisplay: Add "Legacy Mode" options
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Mar 2, 2025
1 parent 26aa7c6 commit a0a86e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mods/tools/GameObjectsDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ void GameObjectsDisplay::on_draw_dev_ui() {
// todo
}

ImGui::SameLine();

ImGui::Checkbox("Legacy Mode", &m_legacy_mode);

m_max_distance->draw("Max Distance for GameObjects");

if (ImGui::SliderFloat("Object Effect Alpha", &m_effect_alpha, 0.0f, 1.0f)) {
Expand Down Expand Up @@ -311,7 +315,7 @@ void GameObjectsDisplay::on_frame() {
}
}

if (is_d3d12) {
if (is_d3d12 && !m_legacy_mode) {
get_world_matrix_method->call<void*>(&world_matrix, context, transform);

DirectX::SimpleMath::Matrix world =
Expand Down
1 change: 1 addition & 0 deletions src/mods/tools/GameObjectsDisplay.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class GameObjectsDisplay : public Tool {
float m_effect_alpha{ 0.5f };
bool m_effect_dirty{ false };
bool m_needs_d3d_init{ false };
bool m_legacy_mode{ false };

ValueList m_options{
*m_enabled,
Expand Down

0 comments on commit a0a86e5

Please sign in to comment.