mirror of
https://github.com/ApfelTeeSaft/OG-Fortnite-Cheat.git
synced 2026-08-26 19:33:33 +00:00
BulletTP!
Features: - Added BulletTP (pickaxes and non-pojectile weapons) - Added ability to toggle visible check - Added ability to toggle sticky aim Minor Changes: - Added outline to windows in RaaxGUI - Made minhook compile with all builds - Removed unnecessary FPS scale recalculation in Vehicles.cpp - Added missing functionality for outlined lines on ImGui - Reworded "ScreeenPositionA" to "ScreenPosition" where there is only 1 screen position - Changed "PostRender" to "DrawTransition" to match the function it's actually finding - Changed "ErrorManager::error" to "ErrorManager::ThrowError" - Added SDKInitializer::InitCalculateShot Bug-Fixes: - Fixed text size incorrect on Engine rendering TO-DO: - Add more signatures for CalculateShot function offset initialization
This commit is contained in:
@@ -16,9 +16,14 @@ namespace Config {
|
||||
|
||||
inline KeyName AimKey = (KeyName)7;
|
||||
|
||||
inline bool BulletTP = false;
|
||||
|
||||
inline bool SilentAim = false;
|
||||
inline bool UseAimKeyForSilent = false;
|
||||
|
||||
inline bool StickyAim = true;
|
||||
inline bool VisibleCheck = true;
|
||||
|
||||
inline bool ShowAimLine = true;
|
||||
inline bool ShowFOV = true;
|
||||
|
||||
|
||||
@@ -12,6 +12,15 @@ void Drawing::RenderQueuedDrawingInfo() {
|
||||
//std::lock_guard<std::mutex> lock(SwapMutex);
|
||||
|
||||
for (auto& Line : RenderBufferLine) {
|
||||
if (Line.Outlined) {
|
||||
ImU32 OutlineColor = ImColor(0.f, 0.f, 0.f, Line.RenderColor.A);
|
||||
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(Line.ScreenPositionA.X + 1, Line.ScreenPositionA.Y), ImVec2(Line.ScreenPositionB.X + 1, Line.ScreenPositionB.Y), OutlineColor, Line.Thickness);
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(Line.ScreenPositionA.X - 1, Line.ScreenPositionA.Y), ImVec2(Line.ScreenPositionB.X - 1, Line.ScreenPositionB.Y), OutlineColor, Line.Thickness);
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(Line.ScreenPositionA.X, Line.ScreenPositionA.Y + 1), ImVec2(Line.ScreenPositionB.X, Line.ScreenPositionB.Y + 1), OutlineColor, Line.Thickness);
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(Line.ScreenPositionA.X, Line.ScreenPositionA.Y - 1), ImVec2(Line.ScreenPositionB.X, Line.ScreenPositionB.Y - 1), OutlineColor, Line.Thickness);
|
||||
}
|
||||
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(Line.ScreenPositionA.X, Line.ScreenPositionA.Y), ImVec2(Line.ScreenPositionB.X, Line.ScreenPositionB.Y), ImColor(Line.RenderColor.R, Line.RenderColor.G, Line.RenderColor.B, Line.RenderColor.A), Line.Thickness);
|
||||
}
|
||||
|
||||
@@ -27,8 +36,7 @@ void Drawing::RenderQueuedDrawingInfo() {
|
||||
}
|
||||
|
||||
if (Text.Outlined) {
|
||||
ImU32 OutlineColor = IM_COL32_BLACK;
|
||||
OutlineColor = (OutlineColor & 0x00FFFFFF) | (ImColor(Text.RenderColor.R, Text.RenderColor.G, Text.RenderColor.B, Text.RenderColor.A) & 0xFF000000);
|
||||
ImU32 OutlineColor = ImColor(0.f, 0.f, 0.f, Text.RenderColor.A);
|
||||
|
||||
ImGui::GetBackgroundDrawList()->AddText(Hooks::Present::LargeFont, Text.FontSize, { TextPosition.x + 1, TextPosition.y }, OutlineColor, Text.RenderText.c_str());
|
||||
ImGui::GetBackgroundDrawList()->AddText(Hooks::Present::LargeFont, Text.FontSize, { TextPosition.x - 1, TextPosition.y }, OutlineColor, Text.RenderText.c_str());
|
||||
@@ -48,22 +56,22 @@ void Drawing::RenderQueuedDrawingInfo() {
|
||||
}
|
||||
|
||||
for (auto& Rect : RenderBufferRect) {
|
||||
ImGui::GetBackgroundDrawList()->AddRect(ImVec2(Rect.ScreenPositionA.X, Rect.ScreenPositionA.Y), ImVec2(Rect.ScreenPositionA.X + Rect.ScreenSize.X, Rect.ScreenPositionA.Y + Rect.ScreenSize.Y), ImColor(Rect.RenderColor.R, Rect.RenderColor.G, Rect.RenderColor.B, Rect.RenderColor.A), 0, 0, Rect.Thickness);
|
||||
ImGui::GetBackgroundDrawList()->AddRect(ImVec2(Rect.ScreenPosition.X, Rect.ScreenPosition.Y), ImVec2(Rect.ScreenPosition.X + Rect.ScreenSize.X, Rect.ScreenPosition.Y + Rect.ScreenSize.Y), ImColor(Rect.RenderColor.R, Rect.RenderColor.G, Rect.RenderColor.B, Rect.RenderColor.A), 0, 0, Rect.Thickness);
|
||||
}
|
||||
|
||||
for (auto& CorneredRect : RenderBufferCorneredRect) {
|
||||
float lineW = CorneredRect.ScreenSize.X / 4;
|
||||
float lineH = CorneredRect.ScreenSize.Y / 4;
|
||||
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(CorneredRect.ScreenPositionA.X, CorneredRect.ScreenPositionA.Y), ImVec2(CorneredRect.ScreenPositionA.X + lineW, CorneredRect.ScreenPositionA.Y), ImColor(CorneredRect.RenderColor.R, CorneredRect.RenderColor.G, CorneredRect.RenderColor.B, CorneredRect.RenderColor.A), CorneredRect.Thickness);
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(CorneredRect.ScreenPositionA.X, CorneredRect.ScreenPositionA.Y), ImVec2(CorneredRect.ScreenPositionA.X, CorneredRect.ScreenPositionA.Y + lineH), ImColor(CorneredRect.RenderColor.R, CorneredRect.RenderColor.G, CorneredRect.RenderColor.B, CorneredRect.RenderColor.A), CorneredRect.Thickness);
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(CorneredRect.ScreenPositionA.X + CorneredRect.ScreenSize.X, CorneredRect.ScreenPositionA.Y), ImVec2(CorneredRect.ScreenPositionA.X + CorneredRect.ScreenSize.X, CorneredRect.ScreenPositionA.Y + lineH), ImColor(CorneredRect.RenderColor.R, CorneredRect.RenderColor.G, CorneredRect.RenderColor.B, CorneredRect.RenderColor.A), CorneredRect.Thickness);
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(CorneredRect.ScreenPositionA.X + CorneredRect.ScreenSize.X - lineW, CorneredRect.ScreenPositionA.Y), ImVec2(CorneredRect.ScreenPositionA.X + CorneredRect.ScreenSize.X, CorneredRect.ScreenPositionA.Y), ImColor(CorneredRect.RenderColor.R, CorneredRect.RenderColor.G, CorneredRect.RenderColor.B, CorneredRect.RenderColor.A), CorneredRect.Thickness);
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(CorneredRect.ScreenPosition.X, CorneredRect.ScreenPosition.Y), ImVec2(CorneredRect.ScreenPosition.X + lineW, CorneredRect.ScreenPosition.Y), ImColor(CorneredRect.RenderColor.R, CorneredRect.RenderColor.G, CorneredRect.RenderColor.B, CorneredRect.RenderColor.A), CorneredRect.Thickness);
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(CorneredRect.ScreenPosition.X, CorneredRect.ScreenPosition.Y), ImVec2(CorneredRect.ScreenPosition.X, CorneredRect.ScreenPosition.Y + lineH), ImColor(CorneredRect.RenderColor.R, CorneredRect.RenderColor.G, CorneredRect.RenderColor.B, CorneredRect.RenderColor.A), CorneredRect.Thickness);
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(CorneredRect.ScreenPosition.X + CorneredRect.ScreenSize.X, CorneredRect.ScreenPosition.Y), ImVec2(CorneredRect.ScreenPosition.X + CorneredRect.ScreenSize.X, CorneredRect.ScreenPosition.Y + lineH), ImColor(CorneredRect.RenderColor.R, CorneredRect.RenderColor.G, CorneredRect.RenderColor.B, CorneredRect.RenderColor.A), CorneredRect.Thickness);
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(CorneredRect.ScreenPosition.X + CorneredRect.ScreenSize.X - lineW, CorneredRect.ScreenPosition.Y), ImVec2(CorneredRect.ScreenPosition.X + CorneredRect.ScreenSize.X, CorneredRect.ScreenPosition.Y), ImColor(CorneredRect.RenderColor.R, CorneredRect.RenderColor.G, CorneredRect.RenderColor.B, CorneredRect.RenderColor.A), CorneredRect.Thickness);
|
||||
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(CorneredRect.ScreenPositionA.X, CorneredRect.ScreenPositionA.Y + CorneredRect.ScreenSize.Y), ImVec2(CorneredRect.ScreenPositionA.X + lineW, CorneredRect.ScreenPositionA.Y + CorneredRect.ScreenSize.Y), ImColor(CorneredRect.RenderColor.R, CorneredRect.RenderColor.G, CorneredRect.RenderColor.B, CorneredRect.RenderColor.A), CorneredRect.Thickness);
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(CorneredRect.ScreenPositionA.X, CorneredRect.ScreenPositionA.Y + CorneredRect.ScreenSize.Y - lineH), ImVec2(CorneredRect.ScreenPositionA.X, CorneredRect.ScreenPositionA.Y + CorneredRect.ScreenSize.Y), ImColor(CorneredRect.RenderColor.R, CorneredRect.RenderColor.G, CorneredRect.RenderColor.B, CorneredRect.RenderColor.A), CorneredRect.Thickness);
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(CorneredRect.ScreenPositionA.X + CorneredRect.ScreenSize.X, CorneredRect.ScreenPositionA.Y + CorneredRect.ScreenSize.Y - lineH), ImVec2(CorneredRect.ScreenPositionA.X + CorneredRect.ScreenSize.X, CorneredRect.ScreenPositionA.Y + CorneredRect.ScreenSize.Y), ImColor(CorneredRect.RenderColor.R, CorneredRect.RenderColor.G, CorneredRect.RenderColor.B, CorneredRect.RenderColor.A), CorneredRect.Thickness);
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(CorneredRect.ScreenPositionA.X + CorneredRect.ScreenSize.X - lineW, CorneredRect.ScreenPositionA.Y + CorneredRect.ScreenSize.Y), ImVec2(CorneredRect.ScreenPositionA.X + CorneredRect.ScreenSize.X, CorneredRect.ScreenPositionA.Y + CorneredRect.ScreenSize.Y), ImColor(CorneredRect.RenderColor.R, CorneredRect.RenderColor.G, CorneredRect.RenderColor.B, CorneredRect.RenderColor.A), CorneredRect.Thickness);
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(CorneredRect.ScreenPosition.X, CorneredRect.ScreenPosition.Y + CorneredRect.ScreenSize.Y), ImVec2(CorneredRect.ScreenPosition.X + lineW, CorneredRect.ScreenPosition.Y + CorneredRect.ScreenSize.Y), ImColor(CorneredRect.RenderColor.R, CorneredRect.RenderColor.G, CorneredRect.RenderColor.B, CorneredRect.RenderColor.A), CorneredRect.Thickness);
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(CorneredRect.ScreenPosition.X, CorneredRect.ScreenPosition.Y + CorneredRect.ScreenSize.Y - lineH), ImVec2(CorneredRect.ScreenPosition.X, CorneredRect.ScreenPosition.Y + CorneredRect.ScreenSize.Y), ImColor(CorneredRect.RenderColor.R, CorneredRect.RenderColor.G, CorneredRect.RenderColor.B, CorneredRect.RenderColor.A), CorneredRect.Thickness);
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(CorneredRect.ScreenPosition.X + CorneredRect.ScreenSize.X, CorneredRect.ScreenPosition.Y + CorneredRect.ScreenSize.Y - lineH), ImVec2(CorneredRect.ScreenPosition.X + CorneredRect.ScreenSize.X, CorneredRect.ScreenPosition.Y + CorneredRect.ScreenSize.Y), ImColor(CorneredRect.RenderColor.R, CorneredRect.RenderColor.G, CorneredRect.RenderColor.B, CorneredRect.RenderColor.A), CorneredRect.Thickness);
|
||||
ImGui::GetBackgroundDrawList()->AddLine(ImVec2(CorneredRect.ScreenPosition.X + CorneredRect.ScreenSize.X - lineW, CorneredRect.ScreenPosition.Y + CorneredRect.ScreenSize.Y), ImVec2(CorneredRect.ScreenPosition.X + CorneredRect.ScreenSize.X, CorneredRect.ScreenPosition.Y + CorneredRect.ScreenSize.Y), ImColor(CorneredRect.RenderColor.R, CorneredRect.RenderColor.G, CorneredRect.RenderColor.B, CorneredRect.RenderColor.A), CorneredRect.Thickness);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,11 +151,11 @@ void Drawing::FilledRect(SDK::FVector2D ScreenPosition, SDK::FVector2D ScreenSiz
|
||||
|
||||
UpdateBufferFilledRect.push_back(Cache);
|
||||
}
|
||||
void Drawing::Rect(SDK::FVector2D ScreenPositionA, SDK::FVector2D ScreenSize, float Thickness, SDK::FLinearColor RenderColor, bool Outlined) {
|
||||
void Drawing::Rect(SDK::FVector2D ScreenPosition, SDK::FVector2D ScreenSize, float Thickness, SDK::FLinearColor RenderColor, bool Outlined) {
|
||||
//std::lock_guard<std::mutex> lock(SwapMutex);
|
||||
|
||||
RectCache Cache;
|
||||
Cache.ScreenPositionA = ScreenPositionA;
|
||||
Cache.ScreenPosition = ScreenPosition;
|
||||
Cache.ScreenSize = ScreenSize;
|
||||
Cache.Thickness = Thickness;
|
||||
Cache.RenderColor = RenderColor;
|
||||
@@ -155,11 +163,11 @@ void Drawing::Rect(SDK::FVector2D ScreenPositionA, SDK::FVector2D ScreenSize, fl
|
||||
|
||||
UpdateBufferRect.push_back(Cache);
|
||||
}
|
||||
void Drawing::CorneredRect(SDK::FVector2D ScreenPositionA, SDK::FVector2D ScreenSize, float Thickness, SDK::FLinearColor RenderColor, bool Outlined) {
|
||||
void Drawing::CorneredRect(SDK::FVector2D ScreenPosition, SDK::FVector2D ScreenSize, float Thickness, SDK::FLinearColor RenderColor, bool Outlined) {
|
||||
//std::lock_guard<std::mutex> lock(SwapMutex);
|
||||
|
||||
CorneredRectCache Cache;
|
||||
Cache.ScreenPositionA = ScreenPositionA;
|
||||
Cache.ScreenPosition = ScreenPosition;
|
||||
Cache.ScreenSize = ScreenSize;
|
||||
Cache.Thickness = Thickness;
|
||||
Cache.RenderColor = RenderColor;
|
||||
@@ -185,16 +193,16 @@ void Drawing::Text(const char* RenderText, SDK::FVector2D ScreenPosition, float
|
||||
std::wstring WideString(WideStrLength, L'\0');
|
||||
LI_FN(MultiByteToWideChar).safe_cached()(CP_UTF8, 0, RenderText, -1, &WideString[0], WideStrLength);
|
||||
|
||||
// Fix text size being innacurate on engine rendering. (Maybe UFont::ScalingFactor?)
|
||||
// Fix text size being inaccurate on engine rendering. (Maybe UFont::ScalingFactor?)
|
||||
|
||||
Text(WideString.c_str(), ScreenPosition, FontSize, RenderColor, CenteredX, CenteredY, Outlined);
|
||||
}
|
||||
void Drawing::Text(const wchar_t* RenderText, SDK::FVector2D ScreenPosition, float FontSize, SDK::FLinearColor RenderColor, bool CenteredX, bool CenteredY, bool Outlined) {
|
||||
SDK::FString FString(RenderText);
|
||||
|
||||
// Fix text size being innacurate on engine rendering. (Maybe UFont::ScalingFactor?)
|
||||
// Fix text size being inaccurate on engine rendering. (Maybe UFont::ScalingFactor?)
|
||||
|
||||
SDK::GetLocalCanvas()->K2_DrawText(FString, ScreenPosition, (int32)FontSize, RenderColor, CenteredX, CenteredY, Outlined);
|
||||
SDK::GetLocalCanvas()->K2_DrawText(FString, ScreenPosition, Outlined ? (int32)FontSize - 2 : (int32)FontSize, RenderColor, CenteredX, CenteredY, Outlined);
|
||||
}
|
||||
SDK::FVector2D Drawing::TextSize(const char* RenderText, float FontSize) {
|
||||
int WideStrLength = LI_FN(MultiByteToWideChar).safe_cached()(CP_UTF8, 0, RenderText, -1, nullptr, 0);
|
||||
@@ -241,15 +249,15 @@ void Drawing::FilledRect(SDK::FVector2D ScreenPosition, SDK::FVector2D ScreenSiz
|
||||
SDK::GetLocalCanvas()->K2_DrawBox(ScreenPosition, ScreenSize, 1.f, SDK::FLinearColor(0.f, 0.f, 0.f, 1.f));
|
||||
}
|
||||
}
|
||||
void Drawing::Rect(SDK::FVector2D ScreenPositionA, SDK::FVector2D ScreenSize, float Thickness, SDK::FLinearColor RenderColor, bool Outlined) {
|
||||
void Drawing::Rect(SDK::FVector2D ScreenPosition, SDK::FVector2D ScreenSize, float Thickness, SDK::FLinearColor RenderColor, bool Outlined) {
|
||||
if (Outlined) {
|
||||
SDK::GetLocalCanvas()->K2_DrawBox(ScreenPositionA, ScreenSize, Thickness + 1.f, SDK::FLinearColor(0.f, 0.f, 0.f, 1.f));
|
||||
SDK::GetLocalCanvas()->K2_DrawBox(ScreenPositionA, ScreenSize, Thickness - 1.f, SDK::FLinearColor(0.f, 0.f, 0.f, 1.f));
|
||||
}
|
||||
|
||||
SDK::GetLocalCanvas()->K2_DrawBox(ScreenPositionA, ScreenSize, Thickness, RenderColor);
|
||||
SDK::GetLocalCanvas()->K2_DrawBox(ScreenPosition, ScreenSize, Thickness, RenderColor);
|
||||
}
|
||||
void Drawing::CorneredRect(SDK::FVector2D ScreenPositionA, SDK::FVector2D ScreenSize, float Thickness, SDK::FLinearColor RenderColor, bool Outlined) {
|
||||
void Drawing::CorneredRect(SDK::FVector2D ScreenPosition, SDK::FVector2D ScreenSize, float Thickness, SDK::FLinearColor RenderColor, bool Outlined) {
|
||||
float lineW = ScreenSize.X / 4;
|
||||
float lineH = ScreenSize.Y / 4;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace Drawing {
|
||||
|
||||
/* Cache hollow rectangles for ImGui processing */
|
||||
struct RectCache {
|
||||
SDK::FVector2D ScreenPositionA;
|
||||
SDK::FVector2D ScreenPosition;
|
||||
SDK::FVector2D ScreenSize;
|
||||
float Thickness;
|
||||
SDK::FLinearColor RenderColor;
|
||||
@@ -57,7 +57,7 @@ namespace Drawing {
|
||||
|
||||
/* Cache cornered rectangles for ImGui processing */
|
||||
struct CorneredRectCache {
|
||||
SDK::FVector2D ScreenPositionA;
|
||||
SDK::FVector2D ScreenPosition;
|
||||
SDK::FVector2D ScreenSize;
|
||||
float Thickness;
|
||||
SDK::FLinearColor RenderColor;
|
||||
@@ -170,21 +170,21 @@ namespace Drawing {
|
||||
/*
|
||||
* @brief Draws a hollow rectangle on the screen
|
||||
*
|
||||
* @param ScreenPositionA - The starting position of the rectangle
|
||||
* @param ScreenPosition - The starting position of the rectangle
|
||||
* @param ScreenSize - The size of the rectangle
|
||||
* @param Thickness - The thickness of the rectangle
|
||||
* @param RenderColor - The color of the rectangle
|
||||
* @param Outlined - Whether or not the rectangle should be outlined
|
||||
*/
|
||||
void Rect(SDK::FVector2D ScreenPositionA, SDK::FVector2D ScreenSize, float Thickness, SDK::FLinearColor RenderColor, bool Outlined);
|
||||
void Rect(SDK::FVector2D ScreenPosition, SDK::FVector2D ScreenSize, float Thickness, SDK::FLinearColor RenderColor, bool Outlined);
|
||||
|
||||
/*
|
||||
* @brief Draws a cornered rectangle on the screen
|
||||
*
|
||||
* @param ScreenPositionA - The starting position of the rectangle
|
||||
* @param ScreenPosition - The starting position of the rectangle
|
||||
* @param ScreenSize - The size of the rectangle
|
||||
* @param Thickness - The thickness of the rectangle
|
||||
* @param RenderColor - The color of the rectangle
|
||||
*/
|
||||
void CorneredRect(SDK::FVector2D ScreenPositionA, SDK::FVector2D ScreenSize, float Thickness, SDK::FLinearColor RenderColor, bool Outlined);
|
||||
void CorneredRect(SDK::FVector2D ScreenPosition, SDK::FVector2D ScreenSize, float Thickness, SDK::FLinearColor RenderColor, bool Outlined);
|
||||
};
|
||||
@@ -175,7 +175,10 @@ void RaaxGUI::Window::Draw() {
|
||||
Drawing::FilledRect(Position, Size, Style.BackgroundColor, false);
|
||||
|
||||
// Draw title bar
|
||||
Drawing::FilledRect(Position, SDK::FVector2D(Size.X, Style.TitleBarSize.Y), { 0.2f, 0.2f, 0.2f, 1.f }, false);
|
||||
Drawing::FilledRect(Position, SDK::FVector2D(Size.X, Style.TitleBarSize.Y), SDK::FLinearColor(0.2f, 0.2f, 0.2f, 1.f), false);
|
||||
|
||||
// Draw border
|
||||
Drawing::Rect(Position, Size, 1.f, SDK::FLinearColor(0.f, 0.f, 0.f, 1.f), true);
|
||||
|
||||
SDK::FVector2D TextPosition = SDK::FVector2D();
|
||||
|
||||
@@ -191,7 +194,7 @@ void RaaxGUI::Window::Draw() {
|
||||
break;
|
||||
}
|
||||
|
||||
Drawing::Text(Name.c_str(), TextPosition, Style.TitleBarTextSize, {1.f, 1.f, 1.f, 1.f}, Style.TitleBarTextAlignment == TextAlignment::Center ? true : false, false, true);
|
||||
Drawing::Text(Name.c_str(), TextPosition, Style.TitleBarTextSize, SDK::FLinearColor(1.f, 1.f, 1.f, 1.f), Style.TitleBarTextAlignment == TextAlignment::Center ? true : false, false, true);
|
||||
|
||||
// Draw elements
|
||||
for (int i = 0; i < Elements.size(); i++) {
|
||||
@@ -552,7 +555,7 @@ template<typename SliderValueType> void RaaxGUI::SliderElement<SliderValueType>:
|
||||
float CalculatedValue = (ClickPosition.X - BoundsPosition.X) / BoundsSize.X;
|
||||
CalculatedValue = std::clamp(CalculatedValue, 0.f, 1.f);
|
||||
|
||||
*Value = (MaxValue - MinValue) * CalculatedValue + MinValue;
|
||||
*Value = (SliderValueType)((MaxValue - MinValue) * CalculatedValue + MinValue);
|
||||
}
|
||||
}
|
||||
template<typename SliderValueType> void RaaxGUI::SliderElement<SliderValueType>::OnClickBegin(const SDK::FVector2D ClickPosition) {
|
||||
@@ -560,7 +563,7 @@ template<typename SliderValueType> void RaaxGUI::SliderElement<SliderValueType>:
|
||||
float CalculatedValue = (ClickPosition.X - BoundsPosition.X) / BoundsSize.X;
|
||||
CalculatedValue = std::clamp(CalculatedValue, 0.f, 1.f);
|
||||
|
||||
*Value = (MaxValue - MinValue) * CalculatedValue + MinValue;
|
||||
*Value = (SliderValueType)((MaxValue - MinValue) * CalculatedValue + MinValue);
|
||||
|
||||
BeingClicked = true;
|
||||
}
|
||||
@@ -583,7 +586,7 @@ template<typename SliderValueType> void RaaxGUI::SliderElement<SliderValueType>:
|
||||
}
|
||||
|
||||
// Calculate the how far along the slider the value is
|
||||
float PercentComplete = (*Value - MinValue) / (MaxValue - MinValue);
|
||||
float PercentComplete = ((float)*Value - (float)MinValue) / ((float)MaxValue - (float)MinValue);
|
||||
PercentComplete = std::clamp(PercentComplete, 0.f, 1.f);
|
||||
|
||||
// Determine the size of the slider based on the current value
|
||||
|
||||
@@ -204,7 +204,7 @@ namespace RaaxGUI {
|
||||
DefaultWindowStyle.TitleBarTextColor = { 0.7f, 0.7f, 0.7f, 1.f }; // Dark grey for title text
|
||||
DefaultWindowStyle.TitleBarTextAlignment = TextAlignment::Center;
|
||||
DefaultWindowStyle.AutoTitleBarTextSize = true;
|
||||
DefaultWindowStyle.TitleBarTextSize = 8.f;
|
||||
DefaultWindowStyle.TitleBarTextSize = 16.f;
|
||||
|
||||
// Checkbox
|
||||
DefaultElementStyle.CheckboxStyle.CheckboxButtonSize = SDK::FVector2D(15.f, 15.f);
|
||||
@@ -215,7 +215,7 @@ namespace RaaxGUI {
|
||||
DefaultElementStyle.CheckboxStyle.CheckboxEnabledInnerBoxColor = { 0.0f, 0.6f, 0.7f, 1.f }; // Adjusted aqua for enabled state
|
||||
|
||||
DefaultElementStyle.CheckboxStyle.CheckboxTextColor = { 0.7f, 0.7f, 0.7f, 1.f }; // Dark grey text
|
||||
DefaultElementStyle.CheckboxStyle.CheckboxTextSize = 12.f;
|
||||
DefaultElementStyle.CheckboxStyle.CheckboxTextSize = 14.f;
|
||||
DefaultElementStyle.CheckboxStyle.CheckboxTextOffset = 5.f;
|
||||
|
||||
DefaultElementStyle.CheckboxStyle.CheckboxPadding = { 5.f, 5.f };
|
||||
@@ -231,8 +231,8 @@ namespace RaaxGUI {
|
||||
DefaultElementStyle.SliderStyle.SliderValueBarColor = { 0.0f, 0.6f, 0.7f, 1.f }; // Adjusted aqua for value bar
|
||||
|
||||
DefaultElementStyle.SliderStyle.SliderValueTextColor = { 0.7f, 0.7f, 0.7f, 1.f }; // Dark grey for value text
|
||||
DefaultElementStyle.SliderStyle.SliderValueTextSize = 8.f;
|
||||
DefaultElementStyle.SliderStyle.SliderValueTextOffset = 3.f;
|
||||
DefaultElementStyle.SliderStyle.SliderValueTextSize = 10.f;
|
||||
DefaultElementStyle.SliderStyle.SliderValueTextOffset = 2.f;
|
||||
|
||||
DefaultElementStyle.SliderStyle.SliderBarColor = { 0.12f, 0.12f, 0.12f, 1.f }; // Darker grey
|
||||
DefaultElementStyle.SliderStyle.SliderBarHoverColor = { 0.16f, 0.16f, 0.16f, 1.f }; // Dark grey hover
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/*
|
||||
* NOTES
|
||||
*
|
||||
* All specific offsets, VFT indexes, function addresses etc
|
||||
* All specific offsets, VFT indexes, function addresses, visual explanations etc
|
||||
* mentioned in comments are from Fortnite 7.40.
|
||||
*
|
||||
*
|
||||
@@ -29,9 +29,8 @@
|
||||
// - Fix unloading crashing on ImGui on some versions of Fortnite
|
||||
// - Improve input class even more (less reliance on tick based UE functions and force input events for WndProc input)
|
||||
// - Improve GetPlayerViewpoint and GetViewpoint VFT index getting
|
||||
// - Fix text size being innacurate on Engine rendering
|
||||
// - Add WndProc hook for Engine
|
||||
// - Add a season based feature system(allow / forbid features only on specific seasons)
|
||||
// - Add a season based feature system (allow/forbid features only on specific seasons)
|
||||
// - Add more menu elements types to RaaxGUI
|
||||
// - Add more features
|
||||
// - Add a batch line processor for better line outlne handling
|
||||
@@ -39,7 +38,6 @@
|
||||
// - Add a PCH
|
||||
// - Make everything in Memory.h my own code (no pasting)
|
||||
// - Add WndProc as an option for Engine rendering
|
||||
// - Add bitfield support for AutoRevertFeature
|
||||
|
||||
#if UNLOAD_THREAD
|
||||
const Input::KeyName UnloadKey = Input::KeyName::F5;
|
||||
@@ -51,9 +49,10 @@ VOID UnloadThread() {
|
||||
LI_FN(Beep).safe()(500, 250);
|
||||
|
||||
// Unhook all hooks
|
||||
if (Hooks::PostRender::Hook) delete Hooks::PostRender::Hook;
|
||||
if (Hooks::DrawTransition::Hook) delete Hooks::DrawTransition::Hook;
|
||||
if (Hooks::GetPlayerViewpoint::Hook) delete Hooks::GetPlayerViewpoint::Hook;
|
||||
if (Hooks::GetViewpoint::Hook) delete Hooks::GetViewpoint::Hook;
|
||||
|
||||
#ifdef _IMGUI
|
||||
LI_FN(SetWindowLongPtrA).safe()(RaaxDx::Window, GWLP_WNDPROC, (LONG_PTR)Hooks::WndProc::WndProcOriginal);
|
||||
RaaxDx::Unhook();
|
||||
@@ -74,7 +73,7 @@ VOID Main() {
|
||||
// Beep to notify that the cheat has been injected
|
||||
LI_FN(Beep).safe()(500, 500);
|
||||
|
||||
// Seed random
|
||||
// Set random seed
|
||||
LI_FN(srand).safe()(time(NULL));
|
||||
|
||||
#if LOG_LEVEL > LOG_NONE
|
||||
@@ -111,8 +110,8 @@ BOOL APIENTRY DllMain( HMODULE hModule,
|
||||
#else
|
||||
Main();
|
||||
#endif // INIT_THREAD
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case DLL_THREAD_ATTACH:
|
||||
case DLL_THREAD_DETACH:
|
||||
case DLL_PROCESS_DETACH:
|
||||
|
||||
@@ -75,24 +75,24 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">
|
||||
<OutDir>$(SolutionDir)\Build\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\Build\$(Configuration)\Intermediates\</IntDir>
|
||||
<TargetName>$(ProjectName)1</TargetName>
|
||||
<TargetName>$(ProjectName)</TargetName>
|
||||
<GenerateManifest>true</GenerateManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">
|
||||
<OutDir>$(SolutionDir)\Build\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\Build\$(Configuration)\Intermediates\</IntDir>
|
||||
<TargetName>$(ProjectName)1</TargetName>
|
||||
<TargetName>$(ProjectName)</TargetName>
|
||||
<GenerateManifest>true</GenerateManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">
|
||||
<OutDir>$(SolutionDir)\Build\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\Build\$(Configuration)\Intermediates\</IntDir>
|
||||
<TargetName>$(ProjectName)1</TargetName>
|
||||
<TargetName>$(ProjectName)</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">
|
||||
<OutDir>$(SolutionDir)\Build\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\Build\$(Configuration)\Intermediates\</IntDir>
|
||||
<TargetName>$(ProjectName)1</TargetName>
|
||||
<TargetName>$(ProjectName)</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">
|
||||
<ClCompile>
|
||||
@@ -217,6 +217,7 @@
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Hooks\Callbacks\CalculateShot.cpp" />
|
||||
<ClCompile Include="Drawing\Drawing.cpp" />
|
||||
<ClCompile Include="External-Libs\ImGui\imgui.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">false</ExcludedFromBuild>
|
||||
@@ -299,37 +300,57 @@
|
||||
<ClCompile Include="Game\SDK\SDK.cpp" />
|
||||
<ClCompile Include="Game\SDK\SDKInitializer.cpp" />
|
||||
<ClCompile Include="Drawing\RaaxGUI\RaaxGUI.cpp" />
|
||||
<ClCompile Include="Hooks\Callbacks\PostRender.cpp" />
|
||||
<ClCompile Include="Hooks\Callbacks\DrawTransition.cpp" />
|
||||
<ClCompile Include="Game\Input\Input.cpp" />
|
||||
<ClCompile Include="Hooks\RaaxDx\minhook\src\buffer.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Hooks\RaaxDx\minhook\src\hde\hde32.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Hooks\RaaxDx\minhook\src\hde\hde64.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Hooks\RaaxDx\minhook\src\hook.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Hooks\RaaxDx\minhook\src\trampoline.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Hooks\RaaxDx\RaaxDx.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">true</ExcludedFromBuild>
|
||||
@@ -413,52 +434,84 @@
|
||||
<ClInclude Include="Drawing\RaaxGUI\RaaxGUI.h" />
|
||||
<ClInclude Include="Game\Input\Input.h" />
|
||||
<ClInclude Include="Hooks\RaaxDx\minhook\include\MinHook.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Hooks\RaaxDx\minhook\src\buffer.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Hooks\RaaxDx\minhook\src\hde\hde32.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Hooks\RaaxDx\minhook\src\hde\hde64.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Hooks\RaaxDx\minhook\src\hde\pstdint.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Hooks\RaaxDx\minhook\src\hde\table32.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Hooks\RaaxDx\minhook\src\hde\table64.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Hooks\RaaxDx\minhook\src\trampoline.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_ImGui|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Engine|x64'">
|
||||
</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Hooks\RaaxDx\RaaxDx.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_Engine|x64'">true</ExcludedFromBuild>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<ClCompile Include="Hooks\Hooks.cpp">
|
||||
<Filter>Hooks</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Hooks\Callbacks\PostRender.cpp">
|
||||
<ClCompile Include="Hooks\Callbacks\DrawTransition.cpp">
|
||||
<Filter>Hooks\Callbacks</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Hooks\Callbacks\GetPlayerViewpoint.cpp">
|
||||
@@ -125,6 +125,9 @@
|
||||
<ClCompile Include="Game\Features\Exploits\Weapon.cpp">
|
||||
<Filter>Game\Features\Exploits</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Hooks\Callbacks\CalculateShot.cpp">
|
||||
<Filter>Hooks\Callbacks</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Game">
|
||||
|
||||
@@ -27,7 +27,7 @@ void Actors::BuildingWeakSpot::Tick() {
|
||||
if (WeakSpot->GetWeakSpotInfo() & 0x4 && !(WeakSpot->GetWeakSpotInfo() & 0x2) && !(WeakSpot->GetWeakSpotInfo() & 0x1)) {
|
||||
// Aimbot
|
||||
if (Config::Aimbot::Enabled && SDK::GetLocalController()->AcknowledgedPawn()) {
|
||||
if ((MainTarget.LocalInfo.IsTargeting == false || MainTarget.GlobalInfo.TargetActor == nullptr)) {
|
||||
if (((MainTarget.LocalInfo.IsTargeting == false || Config::Aimbot::StickyAim == false) || MainTarget.GlobalInfo.TargetActor == nullptr)) {
|
||||
Features::Aimbot::Target PotentialNewTarget{};
|
||||
|
||||
Features::Aimbot::WeakSpotTarget::UpdateTargetInfo(PotentialNewTarget, WeakSpot, MainCamera, AimbotCamera);
|
||||
|
||||
@@ -212,7 +212,7 @@ void Actors::FortPawn::Tick() {
|
||||
|
||||
// Aimbot
|
||||
if (Config::Aimbot::Enabled && SDK::GetLocalPawn()) {
|
||||
if (CurrentPlayer.IsAnyBoneVisible && (!MainTarget.LocalInfo.IsTargeting || !MainTarget.GlobalInfo.TargetActor)) {
|
||||
if ((CurrentPlayer.IsAnyBoneVisible || Config::Aimbot::VisibleCheck == false) && ((MainTarget.LocalInfo.IsTargeting == false || Config::Aimbot::StickyAim == false) || MainTarget.GlobalInfo.TargetActor == nullptr)) {
|
||||
Features::Aimbot::Target PotentialNewTarget{};
|
||||
|
||||
Features::Aimbot::PlayerTarget::UpdateTargetInfo(PotentialNewTarget, CurrentPlayer, MainCamera, AimbotCamera);
|
||||
@@ -220,7 +220,7 @@ void Actors::FortPawn::Tick() {
|
||||
}
|
||||
|
||||
if (MainTarget.GlobalInfo.TargetActor == FortPawn) {
|
||||
if (CurrentPlayer.IsAnyBoneVisible == false) {
|
||||
if (CurrentPlayer.IsAnyBoneVisible == false && Config::Aimbot::VisibleCheck == true) {
|
||||
MainTarget.ResetTarget();
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "Aimbot.h"
|
||||
|
||||
#include "../../../Utilities/Math.h"
|
||||
|
||||
#include "../../../Configs/Config.h"
|
||||
#include "../../Input/Input.h"
|
||||
#include "Target.h"
|
||||
@@ -19,11 +21,17 @@ void Features::Aimbot::AimbotTarget(Target& TargetToAimot) {
|
||||
}
|
||||
}
|
||||
|
||||
// Moved functionality of GetPlayerViewpoint hook and GetViewpoint hook from "Hooks/Callbacks" to here for better organization
|
||||
// Moved functionality of CalculateShot hook, GetPlayerViewpoint hook and GetViewpoint hook from "Hooks/Callbacks" to here for better organization
|
||||
|
||||
void Features::Aimbot::CalculateShotCallback(SDK::FTransform* BulletTransform) {
|
||||
if (Config::Aimbot::BulletTP && Actors::MainTarget.GlobalInfo.TargetActor) {
|
||||
BulletTransform->Translation = Actors::MainTarget.GlobalInfo.TargetBonePosition;
|
||||
}
|
||||
}
|
||||
|
||||
void Features::Aimbot::GetViewpointCallback(SDK::FMinimalViewInfo* OutViewInfo) {
|
||||
if (!Config::Aimbot::SilentAim) return;
|
||||
if (!Actors::MainTarget.LocalInfo.IsTargeting && Config::Aimbot::UseAimKeyForSilent) return;
|
||||
if (Config::Aimbot::SilentAim == false) return;
|
||||
if (!Actors::MainTarget.LocalInfo.IsTargeting == false && Config::Aimbot::UseAimKeyForSilent) return;
|
||||
|
||||
if (Actors::MainTarget.GlobalInfo.TargetActor) {
|
||||
OutViewInfo->SetRotation(Actors::MainCamera.Rotation);
|
||||
@@ -32,8 +40,8 @@ void Features::Aimbot::GetViewpointCallback(SDK::FMinimalViewInfo* OutViewInfo)
|
||||
}
|
||||
|
||||
void Features::Aimbot::GetPlayerViewpointCallback(SDK::FRotator* Rotation) {
|
||||
if (!Config::Aimbot::SilentAim) return;
|
||||
if (!Actors::MainTarget.LocalInfo.IsTargeting && Config::Aimbot::UseAimKeyForSilent) return;
|
||||
if (Config::Aimbot::SilentAim == false) return;
|
||||
if (Actors::MainTarget.LocalInfo.IsTargeting == false && Config::Aimbot::UseAimKeyForSilent) return;
|
||||
|
||||
if (Actors::MainTarget.GlobalInfo.TargetActor) {
|
||||
*Rotation = Actors::MainTarget.LocalInfo.TargetRotationWithSmooth;
|
||||
|
||||
@@ -12,6 +12,13 @@ namespace Features {
|
||||
*/
|
||||
void AimbotTarget(Aimbot::Target& TargetToAimot);
|
||||
|
||||
/*
|
||||
* @brief Callback for the CalculateShot hook (used for silent aim and bullet TP)
|
||||
*
|
||||
* @param ShotTransform The bullet transform
|
||||
*/
|
||||
void CalculateShotCallback(SDK::FTransform* BulletTransform);
|
||||
|
||||
/*
|
||||
* @brief Callback for the GetViewpoint hook (used for silent aim)
|
||||
*
|
||||
|
||||
@@ -127,8 +127,8 @@ bool Features::Aimbot::Target::ShouldSetTarget(Target PotentialTarget) {
|
||||
}
|
||||
else if (PotentialTarget.GlobalInfo.Type == GlobalInfo.Type) {
|
||||
// If the target priority is the same as the current target, then check the parameters
|
||||
if (LocalInfo.IsTargeting) {
|
||||
// If we are targeting, then don't update
|
||||
if (LocalInfo.IsTargeting && Config::Aimbot::StickyAim) {
|
||||
// If we are targeting and using sticky aim, then don't update
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ void Features::Aimbot::Target::SetTarget(Target NewTarget, bool ForceSetTarget)
|
||||
void Features::Aimbot::PlayerTarget::UpdateTargetInfo(Target& Target, Actors::Caches::FortPawnCache& TargetCache, const Actors::Caches::CameraCache& MainCamera, const Actors::Caches::CameraCache& AimbotCamera, const float FPSScale) {
|
||||
// Update global information
|
||||
Target.GlobalInfo.TargetActor = TargetCache.FortPawn;
|
||||
Target.GlobalInfo.TargetBoneId = Features::FortPawnHelper::Bone::FindBestBone(Features::FortPawnHelper::Bone::Head, TargetCache);
|
||||
Target.GlobalInfo.TargetBoneId = Features::FortPawnHelper::Bone::FindBestBone(Features::FortPawnHelper::Bone::Head, TargetCache, Config::Aimbot::VisibleCheck);
|
||||
|
||||
// Determine target type
|
||||
Target.GlobalInfo.Type = (Target.LocalInfo.DistanceFromPlayer <= Config::Aimbot::CloseAim::Range && Config::Aimbot::CloseAim::Enabled) ? Target::TargetType::ClosePlayer : Target::TargetType::FarPlayer;
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#include "../../../Configs/Config.h"
|
||||
|
||||
#include "../../Actors/ActorCache.h"
|
||||
#include "../../Actors/Actors.h"
|
||||
|
||||
#include "../../Input/Input.h"
|
||||
|
||||
void Features::Exploits::Vehicle::Tick() {
|
||||
@@ -52,7 +54,8 @@ void Features::Exploits::Vehicle::Tick() {
|
||||
|
||||
std::chrono::time_point CurrentTime = std::chrono::steady_clock::now();
|
||||
|
||||
if (Config::Exploits::Vehicle::NoTilting) {
|
||||
// Tilting in the air is disabled for planes, it causes many issues
|
||||
if (Vehicle->IsA(SDK::AFortAthenaDoghouseVehicle::StaticClass()) || Config::Exploits::Vehicle::NoTilting) {
|
||||
SDK::FRotator AdjustedCameraRotation = Actors::MainCamera.Rotation;
|
||||
AdjustedCameraRotation.Pitch = 0.f;
|
||||
|
||||
@@ -69,9 +72,10 @@ void Features::Exploits::Vehicle::Tick() {
|
||||
SDK::UKismetMathLibrary::StaticClass()->GetRightVector(Actors::MainCamera.Rotation) * MoveLeftRight +
|
||||
SDK::FVector(0, 0, 1) * MoveUpDown;
|
||||
|
||||
// Adjust MovementDirection for 60 FPS (so speed doesn't depend on FPS)
|
||||
MovementDirection = MovementDirection / Actors::FPSScale;
|
||||
|
||||
SDK::FVector NewLocation = Vehicle->GetRootComponent()->GetPosition() + (MovementDirection * Config::Exploits::Vehicle::FlySpeed);
|
||||
// Adjust NewLocation for 60 FPS using LastTeleportTime (so it doesn't depend on FPS)
|
||||
NewLocation = NewLocation + MovementDirection * (Config::Exploits::Vehicle::FlySpeed / 60.f) * std::chrono::duration_cast<std::chrono::milliseconds>(CurrentTime - LastTeleportTime).count();
|
||||
|
||||
if (MovementDirection != SDK::FVector()) {
|
||||
Vehicle->K2_TeleportTo(NewLocation, CameraRotation);
|
||||
@@ -96,8 +100,14 @@ void Features::Exploits::Vehicle::Tick() {
|
||||
if (Config::Exploits::Vehicle::FreezeInAir) {
|
||||
Vehicle->GetRootComponent()->SetPhysicsLinearVelocity(SDK::FVector(0, 0, 0), false, SDK::FName());
|
||||
}
|
||||
|
||||
LastTeleportTime = CurrentTime;
|
||||
}
|
||||
}
|
||||
else if (VehicleLastTick) {
|
||||
if (WasNoCollisionLastTick) {
|
||||
reinterpret_cast<SDK::AFortAthenaVehicle*>(VehicleLastTick)->SetActorEnableCollision(true);
|
||||
WasNoCollisionLastTick = false;
|
||||
}
|
||||
|
||||
VehicleLastTick = nullptr;
|
||||
}
|
||||
}
|
||||
@@ -10,9 +10,6 @@ namespace Features {
|
||||
|
||||
inline bool WasNoCollisionLastTick = false;
|
||||
inline void* VehicleLastTick = nullptr;
|
||||
|
||||
inline const float IntervalSeconds = 0.f;
|
||||
inline std::chrono::time_point LastTeleportTime = std::chrono::steady_clock::now();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ Features::FortPawnHelper::Bone::BoneID Features::FortPawnHelper::Bone::FindClose
|
||||
if (Bone1Distance < Bone2Distance) return BoneID1;
|
||||
else return BoneID2;
|
||||
}
|
||||
Features::FortPawnHelper::Bone::BoneID Features::FortPawnHelper::Bone::FindBestBone(BoneID TargetBone, Actors::Caches::FortPawnCache& FortPawnCache) {
|
||||
Features::FortPawnHelper::Bone::BoneID Features::FortPawnHelper::Bone::FindBestBone(BoneID TargetBone, Actors::Caches::FortPawnCache& FortPawnCache, bool VisibleCheck) {
|
||||
if (FortPawnCache.BoneVisibilityStates.size() < BONEID_MAX || FortPawnCache.BonePositions2D.size() < BONEID_MAX) {
|
||||
return None;
|
||||
}
|
||||
@@ -33,7 +33,12 @@ Features::FortPawnHelper::Bone::BoneID Features::FortPawnHelper::Bone::FindBestB
|
||||
}
|
||||
}
|
||||
|
||||
return None;
|
||||
if (VisibleCheck == false) {
|
||||
return TargetBone;
|
||||
}
|
||||
else {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
SDK::FName Features::FortPawnHelper::Bone::GetBoneName(BoneID BoneID) {
|
||||
switch (BoneID) {
|
||||
|
||||
@@ -126,8 +126,9 @@ namespace Features {
|
||||
*
|
||||
* @param TargetBone - The optimal bone to aim at
|
||||
* @param FortPawnCache - The pawn cache of the target
|
||||
* @param VisibleCheck - If true,
|
||||
*/
|
||||
BoneID FindBestBone(BoneID TargetBone, Actors::Caches::FortPawnCache& FortPawnCache);
|
||||
BoneID FindBestBone(BoneID TargetBone, Actors::Caches::FortPawnCache& FortPawnCache, bool VisibleCheck);
|
||||
|
||||
/*
|
||||
* @brief Get a cached bone FName from BoneID
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#ifdef _ENGINE
|
||||
#include "../Drawing/RaaxGUI/RaaxGUI.h"
|
||||
#endif
|
||||
#include "../Utilities/Logger.h"
|
||||
|
||||
bool MenuOpen = true;
|
||||
|
||||
@@ -43,27 +44,32 @@ void Game::MenuCallback() {
|
||||
RaaxGUI::Checkbox(skCrypt("Show Aim Line"), &Config::Aimbot::ShowAimLine);
|
||||
RaaxGUI::Checkbox(skCrypt("Show FOV"), &Config::Aimbot::ShowFOV);
|
||||
|
||||
if (RaaxGUI::Checkbox(skCrypt("Standard"), &Config::Aimbot::Standard::Enabled)) {
|
||||
//RaaxGUI::SliderFloat(skCrypt("FOV"), &Config::Aimbot::Standard::FOV, 0.f, 1000.f);
|
||||
//RaaxGUI::SliderFloat(skCrypt("Smoothing"), &Config::Aimbot::Standard::Smoothing, 0.f, 100.f);
|
||||
RaaxGUI::Checkbox(skCrypt("Standard"), &Config::Aimbot::Standard::Enabled);
|
||||
if (Config::Aimbot::Standard::Enabled) {
|
||||
RaaxGUI::SliderInt(skCrypt("Standard FOV"), &Config::Aimbot::Standard::FOV, 0, 180);
|
||||
RaaxGUI::SliderFloat(skCrypt("Standard Smoothing"), &Config::Aimbot::Standard::Smoothing, 1.f, 20.f);
|
||||
}
|
||||
|
||||
if (RaaxGUI::Checkbox(skCrypt("Close Aim"), &Config::Aimbot::CloseAim::Enabled)) {
|
||||
//RaaxGUI::SliderFloat(skCrypt("FOV"), &Config::Aimbot::CloseAim::FOV, 0.f, 1000.f);
|
||||
//RaaxGUI::SliderFloat(skCrypt("Smoothing"), &Config::Aimbot::CloseAim::Smoothing, 0.f, 100.f);
|
||||
RaaxGUI::Checkbox(skCrypt("Close Aim"), &Config::Aimbot::CloseAim::Enabled);
|
||||
if (Config::Aimbot::CloseAim::Enabled) {
|
||||
RaaxGUI::SliderInt(skCrypt("Close FOV"), &Config::Aimbot::CloseAim::FOV, 0, 180);
|
||||
RaaxGUI::SliderFloat(skCrypt("Smoothing"), &Config::Aimbot::CloseAim::Smoothing, 1.f, 20.f);
|
||||
}
|
||||
|
||||
if (RaaxGUI::Checkbox(skCrypt("Weakspot"), &Config::Aimbot::Weakspot::Enabled)) {
|
||||
//RaaxGUI::SliderFloat(skCrypt("FOV"), &Config::Aimbot::Weakspot::FOV, 0.f, 1000.f);
|
||||
//RaaxGUI::SliderFloat(skCrypt("Smoothing"), &Config::Aimbot::Weakspot::Smoothing, 0.f, 100.f);
|
||||
RaaxGUI::Checkbox(skCrypt("Weakspot"), &Config::Aimbot::Weakspot::Enabled);
|
||||
if (Config::Aimbot::Weakspot::Enabled) {
|
||||
RaaxGUI::SliderInt(skCrypt("Weakspot FOV"), &Config::Aimbot::Weakspot::FOV, 0, 180);
|
||||
RaaxGUI::SliderFloat(skCrypt("Weakspot Smoothing"), &Config::Aimbot::Weakspot::Smoothing, 1.f, 20.f);
|
||||
}
|
||||
}
|
||||
}
|
||||
RaaxGUI::EndWindow();
|
||||
|
||||
if (RaaxGUI::BeginWindow(skCrypt("Visual Settings"), &MenuOpen, RaaxGUI::RaaxGUIWindowFlags_None, SDK::FVector2D(rand() % 540, rand() % 540), SDK::FVector2D(250, 350))) {
|
||||
if (RaaxGUI::Checkbox(skCrypt("Player ESP"), &Config::Visuals::Players::Enabled)) {
|
||||
RaaxGUI::Checkbox(skCrypt("Weapon ESP"), &Config::Visuals::Weapons::Enabled);
|
||||
|
||||
RaaxGUI::Checkbox(skCrypt("Player ESP"), &Config::Visuals::Players::Enabled);
|
||||
if (Config::Visuals::Players::Enabled) {
|
||||
RaaxGUI::Checkbox(skCrypt("Box"), &Config::Visuals::Players::Box);
|
||||
RaaxGUI::Checkbox(skCrypt("Skeleton"), &Config::Visuals::Players::Skeleton);
|
||||
RaaxGUI::Checkbox(skCrypt("Distance"), &Config::Visuals::Players::Distance);
|
||||
@@ -72,6 +78,70 @@ void Game::MenuCallback() {
|
||||
}
|
||||
RaaxGUI::EndWindow();
|
||||
|
||||
if (RaaxGUI::BeginWindow(skCrypt("Exploit Settings"), &MenuOpen, RaaxGUI::RaaxGUIWindowFlags_None, SDK::FVector2D(rand() % 540, rand() % 540), SDK::FVector2D(250, 350))) {
|
||||
// Sub Tabs
|
||||
// the worlds GOOFIEST tab switcher
|
||||
RaaxGUI::SliderInt(skCrypt("Sub Tab"), &SubTab, 0, 4);
|
||||
|
||||
switch (SubTab) {
|
||||
case 0:
|
||||
{
|
||||
RaaxGUI::Checkbox(skCrypt("Infinite Builds (client sided 99% of the time)"), &Config::Exploits::Player::InfiniteBuilds);
|
||||
RaaxGUI::Checkbox(skCrypt("Infinite Ammo (client sided 99% of the time)"), &Config::Exploits::Player::InfiniteAmmo);
|
||||
RaaxGUI::Checkbox(skCrypt("Edit Enemy Builds"), &Config::Exploits::Player::EditEnemyBuilds);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
RaaxGUI::Checkbox(skCrypt("No Spread"), &Config::Exploits::Weapon::NoSpread);
|
||||
RaaxGUI::Checkbox(skCrypt("No Recoil"), &Config::Exploits::Weapon::NoRecoil);
|
||||
RaaxGUI::Checkbox(skCrypt("No Reload"), &Config::Exploits::Weapon::NoReload);
|
||||
RaaxGUI::Checkbox(skCrypt("Rapid Fire"), &Config::Exploits::Weapon::RapidFire);
|
||||
RaaxGUI::Checkbox(skCrypt("Damage Multiplier"), &Config::Exploits::Weapon::UseDamageMultiplier);
|
||||
//ImGui::SliderFloat(skCrypt("Rapid Fire Amount"), &Config::Exploits::Weapon::RapidFireAmount, 1.f, 100.f);
|
||||
if (Config::Exploits::Weapon::UseDamageMultiplier) {
|
||||
RaaxGUI::SliderInt(skCrypt("Amount"), &Config::Exploits::Weapon::DamageMultiplier, 1, 100);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
RaaxGUI::Checkbox(skCrypt("Fast Pickaxe"), &Config::Exploits::Pickaxe::FastPickaxe);
|
||||
if (Config::Exploits::Pickaxe::FastPickaxe) {
|
||||
//RaaxGUI::SameLine();
|
||||
RaaxGUI::SliderFloat(skCrypt("Speed"), &Config::Exploits::Pickaxe::SpeedMultiplier, 0.f, 25.f);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
RaaxGUI::Checkbox(skCrypt("Infinite Boost"), &Config::Exploits::Vehicle::InfiniteBoost);
|
||||
RaaxGUI::Checkbox(skCrypt("Fly"), &Config::Exploits::Vehicle::Fly);
|
||||
if (Config::Exploits::Vehicle::Fly) {
|
||||
RaaxGUI::Checkbox(skCrypt("Fly Through Walls (also makes flying better)"), &Config::Exploits::Vehicle::FlyThroughWalls);
|
||||
RaaxGUI::Checkbox(skCrypt("Freeze In Air"), &Config::Exploits::Vehicle::FreezeInAir);
|
||||
RaaxGUI::Checkbox(skCrypt("No Tilting"), &Config::Exploits::Vehicle::NoTilting);
|
||||
RaaxGUI::SliderFloat(skCrypt("Fly Speed"), &Config::Exploits::Vehicle::FlySpeed, 35.f, 1000.f);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
RaaxGUI::Checkbox(skCrypt("Prioritize Farthest Weapons"), &Config::Exploits::Pickup::PrioritizeFarthestWeapons);
|
||||
|
||||
RaaxGUI::Checkbox(skCrypt("Auto Pickup"), &Config::Exploits::Pickup::AutoPickup);
|
||||
if (Config::Exploits::Pickup::AutoPickup) {
|
||||
RaaxGUI::SliderFloat(skCrypt("Auto Pickup Delay (MS)"), &Config::Exploits::Pickup::AutoPickupDelaySecs, 0.f, 10.f);
|
||||
}
|
||||
|
||||
RaaxGUI::SliderInt(skCrypt("Max Pickup Distance"), &Config::Exploits::Pickup::MaxDistance, 1, 500);
|
||||
RaaxGUI::SliderInt(skCrypt("Max Pickup Amount"), &Config::Exploits::Pickup::MaxItems, 1, 500);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
RaaxGUI::EndWindow();
|
||||
|
||||
RaaxGUI::EndFrame();
|
||||
#endif
|
||||
|
||||
@@ -130,11 +200,20 @@ void Game::MenuCallback() {
|
||||
WaitingForKeyInput = true;
|
||||
}
|
||||
|
||||
if (SDK::Cached::Functions::CalculateShot) {
|
||||
ImGui::Checkbox(skCrypt("Bullet TP"), &Config::Aimbot::BulletTP);
|
||||
}
|
||||
|
||||
ImGui::Checkbox(skCrypt("Silent Aim"), &Config::Aimbot::SilentAim);
|
||||
if (Config::Aimbot::SilentAim) ImGui::Checkbox(skCrypt("Use Aim-Key For Silent"), &Config::Aimbot::UseAimKeyForSilent);
|
||||
if (Config::Aimbot::SilentAim) {
|
||||
ImGui::Checkbox(skCrypt("Use Aim-Key For Silent"), &Config::Aimbot::UseAimKeyForSilent);
|
||||
}
|
||||
ImGui::Checkbox(skCrypt("Show Aim Line"), &Config::Aimbot::ShowAimLine);
|
||||
ImGui::Checkbox(skCrypt("Show FOV"), &Config::Aimbot::ShowFOV);
|
||||
|
||||
ImGui::Checkbox(skCrypt("Sticky Aim"), &Config::Aimbot::StickyAim);
|
||||
ImGui::Checkbox(skCrypt("Visible Check"), &Config::Aimbot::VisibleCheck);
|
||||
|
||||
ImGui::Checkbox(skCrypt("Standard"), &Config::Aimbot::Standard::Enabled);
|
||||
if (Config::Aimbot::Standard::Enabled) {
|
||||
ImGui::SliderInt(skCrypt("Standard FOV"), &Config::Aimbot::Standard::FOV, 0, 180);
|
||||
|
||||
@@ -658,6 +658,15 @@ namespace SDK {
|
||||
}
|
||||
};
|
||||
|
||||
struct FTransform {
|
||||
public:
|
||||
FQuat Rotation;
|
||||
FVector Translation;
|
||||
uint8 Pad_AE[0x4];
|
||||
FVector Scale3D;
|
||||
uint8 Pad_AF[0x4];
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct FLinearColor
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "../../Game.h"
|
||||
|
||||
#include "../../../Utilities/Logger.h"
|
||||
#include "../../../Utilities/Error.h"
|
||||
|
||||
namespace SDK {
|
||||
TUObjectArray UObject::ObjectArray;
|
||||
|
||||
@@ -65,8 +65,11 @@ void SDK::Init() {
|
||||
DEBUG_LOG(LOG_OFFSET, std::string(skCrypt("Game Version: ")) + std::to_string(GetGameVersion()));
|
||||
}
|
||||
|
||||
// Init CalculateShot function offset (requires game version)
|
||||
SDKInitializer::InitCalculateShot();
|
||||
|
||||
// Continue initiating VFT Indexes
|
||||
SDKInitializer::InitPRIndex();
|
||||
SDKInitializer::InitDTIndex();
|
||||
SDKInitializer::InitGVIndex();
|
||||
SDKInitializer::InitGPVIndex();
|
||||
}
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
|
||||
namespace SDK {
|
||||
namespace Cached {
|
||||
inline bool UsingCalculateShot = false;
|
||||
|
||||
namespace VFT {
|
||||
inline uintptr_t PostRender;
|
||||
inline uintptr_t DrawTransition;
|
||||
inline uintptr_t ProcessEvent;
|
||||
inline uintptr_t GetPlayerViewpoint;
|
||||
inline uintptr_t GetViewpoint;
|
||||
@@ -244,6 +246,7 @@ namespace SDK {
|
||||
inline uintptr_t AppendString = 0x0;
|
||||
inline uintptr_t FNameConstructor = 0x0;
|
||||
inline uintptr_t LineTraceSingle = 0x0;
|
||||
inline uintptr_t CalculateShot = 0x0;
|
||||
}
|
||||
|
||||
namespace Masks {
|
||||
|
||||
@@ -97,7 +97,7 @@ void SDKInitializer::InitFunctionOffset(const char* FunctionName, std::vector<co
|
||||
}
|
||||
}
|
||||
|
||||
void SDKInitializer::InitPRIndex() {
|
||||
void SDKInitializer::InitDTIndex() {
|
||||
void** Vft = nullptr;
|
||||
|
||||
for (int i = 0; i < SDK::UObject::ObjectArray.Num(); i++)
|
||||
@@ -154,15 +154,15 @@ void SDKInitializer::InitPRIndex() {
|
||||
|
||||
if (Memory::FindPatternInRange({ 0x80, 0xB9, bSuppressTransitionMessage, 0x00, 0x00, 0x00, 0x00 }, Resolve32BitRelativeJump(Vft[i]), 0x35))
|
||||
{
|
||||
SDK::Cached::VFT::PostRender = i;
|
||||
DEBUG_LOG(LOG_OFFSET, std::string(skCrypt("PostRender VFT index found: ")) + std::to_string(SDK::Cached::VFT::PostRender));
|
||||
SDK::Cached::VFT::DrawTransition = i;
|
||||
DEBUG_LOG(LOG_OFFSET, std::string(skCrypt("DrawTransition VFT index found: ")) + std::to_string(SDK::Cached::VFT::DrawTransition));
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (SDK::Cached::VFT::PostRender == 0x0) {
|
||||
THROW_ERROR(std::string(skCrypt("Failed to find PostRender VFT index!")), CRASH_ON_NOT_FOUND);
|
||||
if (SDK::Cached::VFT::DrawTransition == 0x0) {
|
||||
THROW_ERROR(std::string(skCrypt("Failed to find DrawTransition VFT index!")), CRASH_ON_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
void SDKInitializer::InitPEIndex() {
|
||||
@@ -407,6 +407,61 @@ void SDKInitializer::InitLineTraceSingle() {
|
||||
|
||||
DEBUG_LOG(LOG_OFFSET, std::string(skCrypt("LineTraceSingle function offset found: ")) + std::to_string(SDK::Cached::Functions::LineTraceSingle));
|
||||
}
|
||||
void SDKInitializer::InitCalculateShot() {
|
||||
uintptr_t CalculateShotAddress = 0x0;
|
||||
|
||||
if (SDK::GetGameVersion() > 16.00) {
|
||||
CalculateShotAddress = Memory::PatternScan(
|
||||
SDK::GetBaseAddress(),
|
||||
skCrypt("48 8B C4 48 89 58 18 55 56 57 41 54 41 55 41 56 41 57 48 8D A8 ? ? ? ? 48 81 EC ? ? ? ? 0F 29 70 B8 0F 29 78 A8 44 0F 29 40 ? 44 0F 29 48 ? 44 0F 29 90 ? ? ? ? 44 0F 29 98 ? ? ? ? 44 0F 29 A0 ? ? ? ? 44 0F 29 A8 ? ? ? ? 48 8B 05 ? ? ? ? 48 33 C4 48 89 85 ? ? ? ? 4C 8D A1"),
|
||||
0,
|
||||
false);
|
||||
}
|
||||
else if (SDK::GetGameVersion() > 14.00) {
|
||||
CalculateShotAddress = Memory::PatternScan(
|
||||
SDK::GetBaseAddress(),
|
||||
skCrypt("48 89 5C 24 ? 4C 89 4C 24 ? 55 56 57 41 54 41 55 41 56 41 57 48 8D 6C 24 ? 48 81 EC ? ? ? ? 48 8B F9 4C"),
|
||||
0,
|
||||
false);
|
||||
}
|
||||
else if (SDK::GetGameVersion() > 12.00) {
|
||||
CalculateShotAddress = Memory::PatternScan(
|
||||
SDK::GetBaseAddress(),
|
||||
skCrypt("48 89 5C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 4C 89 4C 24 ? 55 41 54 41 55 41 56 41 57 48 8D 6C 24 ? 48 81 EC ? ? ? ? 48 8B F1 4C 8D"),
|
||||
0,
|
||||
false);
|
||||
}
|
||||
else if (SDK::GetGameVersion() > 11.00) {
|
||||
CalculateShotAddress = Memory::PatternScan(
|
||||
SDK::GetBaseAddress(),
|
||||
skCrypt("48 8B C4 48 89 58 10 4C 89 48 20 55 56 57 41 54 41 55 41 56 41 57 48 8D 68 98"),
|
||||
0,
|
||||
false);
|
||||
}
|
||||
else if (SDK::GetGameVersion() > 8.00) {
|
||||
CalculateShotAddress = Memory::PatternScan(
|
||||
SDK::GetBaseAddress(),
|
||||
skCrypt("48 8B C4 48 89 58 10 4C 89 48 20 55 56 57 41 54 41 55 41 56 41 57 48 8D 68 98"),
|
||||
0,
|
||||
false);
|
||||
}
|
||||
else if (SDK::GetGameVersion() > 7.00) {
|
||||
CalculateShotAddress = Memory::PatternScan(
|
||||
SDK::GetBaseAddress(),
|
||||
skCrypt("48 8B C4 48 89 58 10 48 89 70 18 55 57 41 54 41 56 41 57 48 8D 68 88"),
|
||||
0,
|
||||
false);
|
||||
}
|
||||
|
||||
if (CalculateShotAddress) {
|
||||
SDK::Cached::Functions::CalculateShot = CalculateShotAddress - SDK::GetBaseAddress();
|
||||
|
||||
DEBUG_LOG(LOG_OFFSET, std::string(skCrypt("CalculateShot offset found: ")) + std::to_string(SDK::Cached::Functions::CalculateShot));
|
||||
}
|
||||
else {
|
||||
THROW_ERROR(std::string(skCrypt("Failed to find CalculateShot!")), false);
|
||||
}
|
||||
}
|
||||
|
||||
void SDKInitializer::InitGObjects() {
|
||||
DEBUG_LOG(LOG_INFO, std::string(skCrypt("Searching for GObjects...")));
|
||||
|
||||
@@ -94,9 +94,12 @@ public:
|
||||
/* Update the LineTraceSingle function offset (for visible check) */
|
||||
static void InitLineTraceSingle();
|
||||
|
||||
/* Update the CalculateShot function offset (for bullet tp) */
|
||||
static void InitCalculateShot();
|
||||
|
||||
/* Update the PostRender VFT index (for engine rendering) */
|
||||
static void InitPRIndex();
|
||||
|
||||
/* Update the DrawTransition VFT index (for engine rendering, and on ImGui builds for caching draw data) */
|
||||
static void InitDTIndex();
|
||||
|
||||
/* Update the PostRender VFT index (for calling UFunctions) */
|
||||
static void InitPEIndex();
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#include "../Hooks.h"
|
||||
|
||||
#include "../../Game/Features/Aimbot/Aimbot.h"
|
||||
|
||||
SDK::FTransform* Hooks::CalculateShot::CalculateShotHook(void** FortPlayerPawnCalculateShotVFT, uintptr_t arg1, uintptr_t arg2) {
|
||||
SDK::FTransform* ReturnValue = CalculateShotOriginal(FortPlayerPawnCalculateShotVFT, arg1, arg2);
|
||||
|
||||
if (SDK::IsValidPointer(ReturnValue)) {
|
||||
Features::Aimbot::CalculateShotCallback(ReturnValue);
|
||||
}
|
||||
|
||||
return ReturnValue;
|
||||
}
|
||||
+5
-5
@@ -8,9 +8,9 @@
|
||||
#include "../../Utilities/Logger.h"
|
||||
#include "../../Utilities/Math.h"
|
||||
|
||||
void Hooks::PostRender::PostRender(uintptr_t this_, uintptr_t Canvas) {
|
||||
if (Canvas == NULL) {
|
||||
return PostRenderOriginal(this_, Canvas);
|
||||
void Hooks::DrawTransition::DrawTransition(uintptr_t this_, uintptr_t Canvas) {
|
||||
if (Canvas == 0x0) {
|
||||
return DrawTransitionOriginal(this_, Canvas);
|
||||
//return spoof_call<void>(PostRenderOriginal, this_, Canvas);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ void Hooks::PostRender::PostRender(uintptr_t this_, uintptr_t Canvas) {
|
||||
Game::ScreenWidth = reinterpret_cast<SDK::UCanvas*>(Canvas)->SizeX();
|
||||
Game::ScreenHeight = reinterpret_cast<SDK::UCanvas*>(Canvas)->SizeY();
|
||||
|
||||
// Clamp the FOV to fix target issues on extreme FOV's. This does make it innacurate on FOV's above 120, but this doesn't really matter
|
||||
// Clamp the FOV to fix target issues on extreme FOV's. This does make it inaccurate on FOV's above 120, but this doesn't really matter
|
||||
Game::PixelsPerDegree = Game::ScreenWidth / Math::RadiansToDegrees((2 * tan(0.5f * Math::DegreesToRadians(Math::Clamp(Actors::MainCamera.FOV, 0, 120)))));
|
||||
|
||||
Hooks::Tick();
|
||||
@@ -48,6 +48,6 @@ void Hooks::PostRender::PostRender(uintptr_t this_, uintptr_t Canvas) {
|
||||
Game::MenuCallback();
|
||||
#endif
|
||||
|
||||
return PostRenderOriginal(this_, Canvas);
|
||||
return DrawTransitionOriginal(this_, Canvas);
|
||||
//return spoof_call<void>(PostRenderOriginal, this_, Canvas);
|
||||
}
|
||||
@@ -9,6 +9,8 @@
|
||||
#include "../Utilities/Logger.h"
|
||||
|
||||
#include "../Configs/Config.h"
|
||||
#include "../Utilities/Memory.h"
|
||||
#include "RaaxDx/minhook/include/MinHook.h"
|
||||
|
||||
template <typename T>
|
||||
Hooks::VFTHook::VFTHook(void** VFT, const uintptr_t VFTIndex, T& Original, void* Hook) {
|
||||
@@ -47,12 +49,21 @@ Hooks::VFTHook::~VFTHook() {
|
||||
}
|
||||
|
||||
void Hooks::Init() {
|
||||
if (SDK::Cached::VFT::PostRender) {
|
||||
PostRender::Hook = new Hooks::VFTHook(
|
||||
MH_Initialize();
|
||||
|
||||
MH_STATUS CreateCalculateShotHook = MH_CreateHook((void*)(SDK::Cached::Functions::CalculateShot + SDK::GetBaseAddress()), &Hooks::CalculateShot::CalculateShotHook, (void**)&Hooks::CalculateShot::CalculateShotOriginal);
|
||||
MH_STATUS EnableCalculateShotHook = MH_EnableHook((void*)(SDK::Cached::Functions::CalculateShot + SDK::GetBaseAddress()));
|
||||
|
||||
if (CreateCalculateShotHook != MH_OK || EnableCalculateShotHook != MH_OK) {
|
||||
DEBUG_LOG(LOG_ERROR, std::string(skCrypt("Failed to hook CalculateShot! Create Status: ")) + std::to_string(CreateCalculateShotHook) + std::string(skCrypt(" Enable Status: ")) + std::to_string(EnableCalculateShotHook));
|
||||
}
|
||||
|
||||
if (SDK::Cached::VFT::DrawTransition) {
|
||||
DrawTransition::Hook = new Hooks::VFTHook(
|
||||
SDK::GetEngine()->GameViewport()->Vft,
|
||||
SDK::Cached::VFT::PostRender,
|
||||
Hooks::PostRender::PostRenderOriginal,
|
||||
Hooks::PostRender::PostRender);
|
||||
SDK::Cached::VFT::DrawTransition,
|
||||
Hooks::DrawTransition::DrawTransitionOriginal,
|
||||
Hooks::DrawTransition::DrawTransition);
|
||||
}
|
||||
}
|
||||
void Hooks::Tick() {
|
||||
|
||||
@@ -80,15 +80,22 @@ namespace Hooks {
|
||||
}
|
||||
#endif // _IMGUI
|
||||
|
||||
namespace PostRender {
|
||||
using PostRenderParams = void(*)(uintptr_t this_, uintptr_t Canvas);
|
||||
inline PostRenderParams PostRenderOriginal = nullptr;
|
||||
namespace DrawTransition {
|
||||
using DrawTransitionParams = void(*)(uintptr_t this_, uintptr_t Canvas);
|
||||
inline DrawTransitionParams DrawTransitionOriginal = nullptr;
|
||||
|
||||
void PostRender(uintptr_t this_, uintptr_t Canvas);
|
||||
void DrawTransition(uintptr_t this_, uintptr_t Canvas);
|
||||
|
||||
inline Hooks::VFTHook* Hook = nullptr;
|
||||
}
|
||||
|
||||
namespace CalculateShot {
|
||||
using CalcShotParams = SDK::FTransform*(*)(void**, uintptr_t, uintptr_t);
|
||||
inline CalcShotParams CalculateShotOriginal = nullptr;
|
||||
|
||||
SDK::FTransform* CalculateShotHook(void** arg0, uintptr_t arg1, uintptr_t arg2);
|
||||
}
|
||||
|
||||
namespace GetPlayerViewpoint {
|
||||
using GetPlayerViewpointParams = void(*)(void* this_, SDK::FVector* Location, SDK::FRotator* Rotation);
|
||||
inline GetPlayerViewpointParams GetPlayerViewpointOriginal = nullptr;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "RaaxDx.h"
|
||||
|
||||
#include <Psapi.h>
|
||||
#include "../../Utilities/Error.h"
|
||||
|
||||
#include "../../External-Libs/LazyImporter.h"
|
||||
#include "../../External-Libs/skCrypter.h"
|
||||
|
||||
@@ -20,7 +20,11 @@ private:
|
||||
std::string(FilePath);
|
||||
}
|
||||
public:
|
||||
static void error(std::string Message, bool Close, const char* FilePath, int Line) {
|
||||
#if _DEBUG
|
||||
static void ThrowError(std::string Message, bool Close, const char* FilePath, int Line) {
|
||||
#else
|
||||
static void ThrowError(std::string Message, bool Close) {
|
||||
#endif
|
||||
#if SHOW_MESSAGE_BOX
|
||||
std::string ErrorMessageInfo = "";
|
||||
std::string ErrorMessage = "";
|
||||
@@ -56,7 +60,7 @@ public:
|
||||
};
|
||||
|
||||
#if _DEBUG
|
||||
#define THROW_ERROR(message, close) ErrorManager::error(message, close, __FILE__, __LINE__)
|
||||
#define THROW_ERROR(message, close) ErrorManager::ThrowError(message, close, __FILE__, __LINE__)
|
||||
#else
|
||||
#define THROW_ERROR(message, close) ErrorManager::error(message, close, "", 0)
|
||||
#define THROW_ERROR(message, close) ErrorManager::ThrowError(message, close)
|
||||
#endif
|
||||
@@ -1,4 +1,7 @@
|
||||
#pragma once
|
||||
#include "../Globals.h"
|
||||
|
||||
#if LOG_LEVEL > LOG_NONE
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
@@ -6,7 +9,7 @@
|
||||
#include <sstream>
|
||||
|
||||
#include "Error.h"
|
||||
#include "../Globals.h"
|
||||
#endif
|
||||
|
||||
// Only log if the log level is not LOG_NO
|
||||
#if LOG_LEVEL > LOG_NONE
|
||||
|
||||
@@ -135,6 +135,21 @@ namespace Math {
|
||||
return degrees * (M_PI / 180.0f);
|
||||
}
|
||||
|
||||
inline SDK::FQuat FRotatorToQuat(SDK::FRotator Rotator) {
|
||||
float SP, SY, SR, CP, CY, CR;
|
||||
Math::SinCos(&SP, &CP, Math::DegreesToRadians(Rotator.Pitch));
|
||||
Math::SinCos(&SY, &CY, Math::DegreesToRadians(Rotator.Yaw));
|
||||
Math::SinCos(&SR, &CR, Math::DegreesToRadians(Rotator.Roll));
|
||||
|
||||
SDK::FQuat RotationQuat;
|
||||
RotationQuat.X = CR * SP * SY - SR * CP * CY;
|
||||
RotationQuat.Y = -CR * SP * CY - SR * CP * SY;
|
||||
RotationQuat.Z = CR * CP * SY - SR * SP * CY;
|
||||
RotationQuat.W = CR * CP * CY + SR * SP * SY;
|
||||
|
||||
return RotationQuat;
|
||||
}
|
||||
|
||||
inline float RadiansToDegrees(float radians) {
|
||||
return radians * (180.0f / M_PI);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user