Skip to content

Commit

Permalink
Add entity model display options
Browse files Browse the repository at this point in the history
  • Loading branch information
TomGrobbe committed Mar 18, 2019
1 parent bce6d27 commit bd7a231
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion vMenu/FunctionsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2727,6 +2727,16 @@ private async Task ModelDrawDimensions()
DrawTextOnScreen($"Veh {v.Handle}", 0f, 0f, 0.3f, Alignment.Center, 0);
ClearDrawOrigin();
}
if (MainMenu.MiscSettingsMenu.ShowEntityModels && v.IsOnScreen)
{
SetDrawOrigin(v.Position.X, v.Position.Y, v.Position.Z - 0.3f, 0);
int model = GetEntityModel(v.Handle);

string hashes = $"{model} / {(uint)model} / 0x{model.ToString("X8")}";

DrawTextOnScreen($"Hash {hashes}", 0f, 0f, 0.3f, Alignment.Center, 0);
ClearDrawOrigin();
}
}
}

Expand All @@ -2748,6 +2758,17 @@ private async Task ModelDrawDimensions()
DrawTextOnScreen($"Prop {p.Handle}", 0f, 0f, 0.3f, Alignment.Center, 0);
ClearDrawOrigin();
}

if (MainMenu.MiscSettingsMenu.ShowEntityModels && p.IsOnScreen)
{
SetDrawOrigin(p.Position.X, p.Position.Y, p.Position.Z - 0.3f, 0);
int model = GetEntityModel(p.Handle);

string hashes = $"{model} / {(uint)model} / 0x{model.ToString("X8")}";

DrawTextOnScreen($"Hash {hashes}", 0f, 0f, 0.3f, Alignment.Center, 0);
ClearDrawOrigin();
}
}
}

Expand All @@ -2769,6 +2790,17 @@ private async Task ModelDrawDimensions()
DrawTextOnScreen($"Ped {p.Handle}", 0f, 0f, 0.3f, Alignment.Center, 0);
ClearDrawOrigin();
}

if (MainMenu.MiscSettingsMenu.ShowEntityModels && p.IsOnScreen)
{
SetDrawOrigin(p.Position.X, p.Position.Y, p.Position.Z - 0.3f, 0);
int model = GetEntityModel(p.Handle);

string hashes = $"{model} / {(uint)model} / 0x{model.ToString("X8")}";

DrawTextOnScreen($"Hash {hashes}", 0f, 0f, 0.3f, Alignment.Center, 0);
ClearDrawOrigin();
}
}
}
}
Expand Down Expand Up @@ -2800,14 +2832,15 @@ private async Task AnimalPedCameraChangeBlocker()
#endregion

#region Slow misc tick

internal static float entityRange = 2000f;
/// <summary>
/// Slow functions for the model dimensions outline entities lists.
/// </summary>
/// <returns></returns>
private async Task SlowMiscTick()
{
const int delay = 50;
const float entityRange = 2000f;
//const int limit = 200;
if (MainMenu.PermissionsSetupComplete && MainMenu.MiscSettingsMenu != null)
{
Expand Down

0 comments on commit bd7a231

Please sign in to comment.