Skip to content

Commit

Permalink
show all wins when main window is open
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteCorum committed Sep 11, 2024
1 parent 338fa3d commit 3f9f358
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions DragonBurn/Core/Cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ void Visual(const CEntity& LocalEntity)
void Radar(Base_Radar Radar, const CEntity& LocalEntity)
{
// Radar render
if (RadarCFG::ShowRadar && LocalEntity.Controller.TeamID != 0)
if ((RadarCFG::ShowRadar && LocalEntity.Controller.TeamID != 0) || (RadarCFG::ShowRadar && MenuConfig::ShowMenu))
{
Radar.Render();
ImGui::End();
Expand Down Expand Up @@ -322,7 +322,7 @@ void RenderCrosshair(ImDrawList* drawList, const CEntity& LocalEntity)
bool isScoped;
ProcessMgr.ReadMemory<bool>(LocalEntity.Pawn.Address + Offset.Pawn.isScoped, isScoped);

if (!MiscCFG::SniperCrosshair || LocalEntity.Controller.TeamID == 0 || !TriggerBot::CheckScopeWeapon(LocalEntity) || isScoped)
if (!MiscCFG::SniperCrosshair || LocalEntity.Controller.TeamID == 0 || !TriggerBot::CheckScopeWeapon(LocalEntity) || isScoped || MenuConfig::ShowMenu)
return;

Render::DrawCrossHair(drawList, ImVec2(ImGui::GetIO().DisplaySize.x / 2, ImGui::GetIO().DisplaySize.y / 2), MiscCFG::SniperCrosshairColor);
Expand Down
4 changes: 2 additions & 2 deletions DragonBurn/Core/Render.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ namespace Render

void DrawFov(const CEntity& LocalEntity, float Size, ImColor Color, float Thickness)
{
if (!LegitBotConfig::ShowFovLine)
if (!LegitBotConfig::ShowFovLine || MenuConfig::ShowMenu)
return;

float Length;
Expand All @@ -184,7 +184,7 @@ namespace Render

void HeadShootLine(const CEntity& LocalEntity, ImColor Color)
{
if (!MiscCFG::ShowHeadShootLine)
if (!MiscCFG::ShowHeadShootLine || MenuConfig::ShowMenu)
return;

float View = 0.f;
Expand Down
13 changes: 5 additions & 8 deletions DragonBurn/Features/BombTimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace bmb

void RenderWindow(int inGame)
{
if (!MiscCFG::bmbTimer || inGame == 0)
if ((!MiscCFG::bmbTimer || inGame == 0) && !(MiscCFG::bmbTimer && MenuConfig::ShowMenu))
return;

bool isBombPlanted;
Expand All @@ -60,21 +60,18 @@ namespace bmb
plantTime = time;
}

if (!isPlanted)
{
return;
}

//ProcessMgr.ReadMemory(Offset.PlantedC4 + Offset.C4.m_flDefuseCountDown, IsBeingDefused);
//ProcessMgr.ReadMemory(Offset.PlantedC4 + Offset.C4.m_flDefuseCountDown, DefuseTime);

if (!isPlanted && !MenuConfig::ShowMenu)
return;

static float windowWidth = 200.0f;
ImGuiWindowFlags flags = ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize;
ImGui::SetNextWindowPos({ (ImGui::GetIO().DisplaySize.x - 200.0f) / 2.0f, 80.0f }, ImGuiCond_Once);
ImGui::SetNextWindowSize({ windowWidth, 0 }, ImGuiCond_Once);
ImGui::GetStyle().WindowRounding = 8.0f;
ImGui::Begin("Bomb Timer", nullptr, flags);

float remaining = (40000 - (int64_t)time + plantTime) / (float)1000;

/*
Expand Down Expand Up @@ -116,7 +113,7 @@ namespace bmb
{
isPlanted = false;
}
ImGui::PopStyleColor();
//ImGui::PopStyleColor();
ImGui::End();
}
}
14 changes: 7 additions & 7 deletions DragonBurn/Features/Misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ namespace fs = std::filesystem;

namespace Misc
{
bool aKeyPressed = false;
bool dKeyPressed = false;
bool wKeyPressed = false;
bool sKeyPressed = false;
//bool aKeyPressed = false;
//bool dKeyPressed = false;
//bool wKeyPressed = false;
//bool sKeyPressed = false;
HitMarker hitMarker(0, std::chrono::steady_clock::now());
const float HitMarker::SIZE = 10.f;
const float HitMarker::GAP = 3.f;

void Watermark(const CEntity& LocalPlayer) noexcept
{
if (!MiscCFG::WaterMark || LocalPlayer.Controller.TeamID == 0)
if ((!MiscCFG::WaterMark || LocalPlayer.Controller.TeamID == 0) && !(MiscCFG::WaterMark && MenuConfig::ShowMenu))
return;

// globalvars GV;
Expand Down Expand Up @@ -55,7 +55,7 @@ namespace Misc

void HitManager(const CEntity& LocalPlayer, int& PreviousTotalHits) noexcept
{
if ((!MiscCFG::HitSound && !MiscCFG::HitMarker) || LocalPlayer.Controller.TeamID == 0)// or aLocalPlayer.Controller.Health)//add in game cheack
if ((!MiscCFG::HitSound && !MiscCFG::HitMarker) || LocalPlayer.Controller.TeamID == 0 || MenuConfig::ShowMenu)
{
return;
}
Expand Down Expand Up @@ -90,7 +90,7 @@ namespace Misc

void BunnyHop(const CEntity& Local) noexcept
{
if (!MiscCFG::BunnyHop)
if (!MiscCFG::BunnyHop || MenuConfig::ShowMenu || Local.Controller.TeamID == 0)
return;

HWND hwnd_cs2 = FindWindowA(NULL, "Counter-Strike 2");
Expand Down
4 changes: 2 additions & 2 deletions DragonBurn/Features/SpectatorList.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ namespace SpecList
{
void SpectatorWindowList(CEntity& LocalEntity)
{
if (!MiscCFG::SpecList || LocalEntity.Controller.TeamID == 0)
return;
if ((!MiscCFG::SpecList || LocalEntity.Controller.TeamID == 0) && !(MiscCFG::SpecList && MenuConfig::ShowMenu))
return;

ImGuiWindowFlags flags = ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize;
static float fontHeight = ImGui::GetFontSize();
Expand Down
3 changes: 3 additions & 0 deletions DragonBurn/Features/TriggerBot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ bool WaitForNoAttack = false;

void TriggerBot::Run(const CEntity& LocalEntity)
{
if (MenuConfig::ShowMenu)
return;

if (LocalEntity.Controller.AliveStatus == 0)
return;

Expand Down
2 changes: 1 addition & 1 deletion DragonBurn/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define _CRT_SECURE_NO_WARNINGS
#define DEBUG false
#define DEBUG true
#include "Core/Cheats.h"
#include "Offsets/Offsets.h"
#include "Resources/Language.h"
Expand Down

0 comments on commit 3f9f358

Please sign in to comment.