Skip to content

Commit

Permalink
added rcs
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteCorum committed Sep 23, 2024
1 parent 0973e82 commit 7390124
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 2 additions & 0 deletions DragonBurn/Config/ConfigSaver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ namespace MyConfigSaver


ConfigData["RCS"]["Enable"]= LegitBotConfig::RCS;
ConfigData["RCS"]["RCSBullet"]= RCS::RCSBullet;
ConfigData["RCS"]["Yaw"]= RCS::RCSScale.x;
ConfigData["RCS"]["Pitch"]= RCS::RCSScale.y;

Expand Down Expand Up @@ -391,6 +392,7 @@ namespace MyConfigSaver
if (ConfigData.contains("RCS"))
{
LegitBotConfig::RCS = ReadData(ConfigData["RCS"],{"Enable"}, false);
RCS::RCSBullet = ReadData(ConfigData["RCS"], { "RCSBullet" }, 1);
RCS::RCSScale.x = ReadData(ConfigData["RCS"],{"Yaw"}, 1.f);
RCS::RCSScale.y = ReadData(ConfigData["RCS"],{"Pitch"}, 1.f);
}
Expand Down
5 changes: 3 additions & 2 deletions DragonBurn/Core/Cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ void AIM(const CEntity& LocalEntity, std::vector<Vec3> AimPosList)
// Aimbot
DWORD lastTick = 0;
DWORD currentTick = GetTickCount64();
if (LegitBotConfig::AimBot) {
if (LegitBotConfig::AimBot)
{
Render::DrawFovCircle(LocalEntity);

if (LegitBotConfig::AimAlways || GetAsyncKeyState(AimControl::HotKey)) {
Expand All @@ -281,7 +282,7 @@ void AIM(const CEntity& LocalEntity, std::vector<Vec3> AimPosList)
}
}

if (!AimControl::AimBot || !AimControl::HasTarget)
if (!LegitBotConfig::AimBot)
RCS::RecoilControl(LocalEntity);

}
Expand Down
5 changes: 4 additions & 1 deletion DragonBurn/Core/GUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,11 @@ namespace GUI
ImGui::SetCursorPosY(24.f);
ImGui::SeparatorText("RCS");
float recoilMin = 0.f, recoilMax = 2.f;
int RCSBulletMin = 0, RCSBulletMax = 5;
PutSwitch(Text::RCS::Toggle.c_str(), 5.f, ImGui::GetFrameHeight() * 1.7, &LegitBotConfig::RCS);
if (LegitBotConfig::RCS) {
if (LegitBotConfig::RCS)
{
PutSliderInt(Text::RCS::BulletSlider.c_str(), 5.f, &RCS::RCSBullet, &RCSBulletMin, &RCSBulletMax, "%d");
PutSliderFloat(Text::RCS::Yaw.c_str(), 5.f, &RCS::RCSScale.x, &recoilMin, &recoilMax, "%.2f");
PutSliderFloat(Text::RCS::Pitch.c_str(), 5.f, &RCS::RCSScale.y, &recoilMin, &recoilMax, "%.2f");
float scalex = (2.22 - RCS::RCSScale.x) *.5f;
Expand Down
7 changes: 0 additions & 7 deletions DragonBurn/Features/RCS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,13 @@ void RCS::UpdateAngles(const CEntity& Local, Vec2& Angles)

void RCS::RecoilControl(CEntity LocalPlayer)
{
Log::Debug("RCS");

if (!LegitBotConfig::RCS)
return;

static Vec2 OldPunch;

if (LocalPlayer.Pawn.ShotsFired > RCSBullet)
{
Log::Debug("RCS IN");
Vec2 viewAngles = LocalPlayer.Pawn.ViewAngle;
Vec2 delta = viewAngles - (viewAngles + (OldPunch - (LocalPlayer.Pawn.AimPunchAngle * 2.f)));

Expand All @@ -80,11 +77,7 @@ void RCS::RecoilControl(CEntity LocalPlayer)
}

OldPunch = LocalPlayer.Pawn.AimPunchAngle * 2.0f;
Log::Debug("RCS END");
}
else
{
Log::Debug("RCS OUT");
OldPunch = Vec2{ 0,0 };
}
}
1 change: 1 addition & 0 deletions DragonBurn/Resources/Language.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ namespace Text {

namespace RCS
{
inline std::string BulletSlider = "Start Bullet:";
inline std::string Toggle = "Recoil Control";
inline std::string Yaw = "Yaw: ";
inline std::string Pitch = "Pitch: ";
Expand Down

0 comments on commit 7390124

Please sign in to comment.