Fix crash with teleport to coord (vc)

This commit is contained in:
Grinch_ 2021-09-16 19:35:02 +06:00
parent 565d416bac
commit 3f6d6b9320
3 changed files with 2 additions and 9 deletions

View File

@ -47,13 +47,6 @@ void Hook::RenderFrame(void* ptr)
io.FontDefault = io.Fonts->AddFontFromFileTTF("C:/Windows/Fonts/trebucbd.ttf", fontSize); io.FontDefault = io.Fonts->AddFontFromFileTTF("C:/Windows/Fonts/trebucbd.ttf", fontSize);
io.Fonts->Build(); io.Fonts->Build();
// add icon font
ImFontConfig config;
config.MergeMode = true;
config.GlyphMinAdvanceX = 13.0f; // icon monospaced
static const ImWchar icon_ranges[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };
io.Fonts->AddFontFromFileTTF(PLUGIN_PATH((char*)"CheatMenu/icon_font.ttf"), 13.0f, &config, icon_ranges);
if (Globals::renderer == Render_DirectX9) if (Globals::renderer == Render_DirectX9)
{ {
ImGui_ImplDX9_InvalidateDeviceObjects(); ImGui_ImplDX9_InvalidateDeviceObjects();

View File

@ -219,7 +219,7 @@ void Teleport::Draw()
if (ImGui::Button("Teleport to coord", Ui::GetSize(2))) if (ImGui::Button("Teleport to coord", Ui::GetSize(2)))
{ {
CVector pos; CVector pos{0, 0, 10};
try try
{ {

View File

@ -28,7 +28,7 @@ workspace "CheatMenu"
location "../build" location "../build"
project "Depend" project "Depend"
kind "SharedLib" kind "StaticLib"
targetdir "../build/bin" targetdir "../build/bin"
files { files {