mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: fix toggle for all polygon flags
1<<16 will overflow u16 by 1.
This commit is contained in:
parent
ebd89d934f
commit
dbdafd44e4
@ -127,10 +127,12 @@ void ConvexVolumeTool::handleMenu()
|
||||
ImGui::Text("Poly Flags");
|
||||
ImGui::Indent();
|
||||
|
||||
for (int i = 0; i < V_ARRAYSIZE(g_navMeshPolyFlagNames); i++)
|
||||
const int numPolyFlags = V_ARRAYSIZE(g_navMeshPolyFlagNames);
|
||||
|
||||
for (int i = 0; i < numPolyFlags; i++)
|
||||
{
|
||||
const char* flagName = g_navMeshPolyFlagNames[i];
|
||||
ImGui::CheckboxFlags(flagName, &m_polyFlags, 1<<i);
|
||||
ImGui::CheckboxFlags(flagName, &m_polyFlags, i == (numPolyFlags-1) ? EDITOR_POLYFLAGS_ALL : 1<<i);
|
||||
}
|
||||
|
||||
ImGui::Unindent();
|
||||
|
Loading…
x
Reference in New Issue
Block a user