Skip to content

Commit

Permalink
UObjectHook: Fix DoubleProperty display on UE5
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Oct 6, 2024
1 parent 83a98c4 commit b17be34
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/mods/UObjectHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3341,7 +3341,10 @@ void UObjectHook::ui_handle_properties(void* object, sdk::UStruct* uclass) {
case "DoubleProperty"_fnv:
{
auto& value = *(double*)((uintptr_t)object + ((sdk::FProperty*)prop)->get_offset());
ImGui::DragFloat(utility::narrow(prop->get_field_name().to_string()).data(), (float*)&value, 0.01f);
float casted_value = (float)value;
if (ImGui::DragFloat(utility::narrow(prop->get_field_name().to_string()).data(), (float*)&casted_value, 0.01f)) {
value = (double)casted_value;
}
display_context(value);
}
break;
Expand Down

0 comments on commit b17be34

Please sign in to comment.