Skip to content

Commit

Permalink
Merge branch 'master' into recreate-a-playerdatabase
Browse files Browse the repository at this point in the history
  • Loading branch information
Rxann authored Jun 24, 2024
2 parents 72b3893 + a1bb94a commit 91e173c
Show file tree
Hide file tree
Showing 54 changed files with 1,346 additions and 214 deletions.
88 changes: 88 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Bug report
description: Create a report to help us improve
title: "[Bug]: "
labels: bug
body:
- type: textarea
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: Logs and/or screenshots
description: |
For a bug report to be valid, please include the logs for HorseMenu.
They can be found under `%appdata%/HorseMenu/cout.log`, even if you think the log file is useless we'd still like for you to include it here.
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
value: |
```
<paste your logs here>
```
validations:
required: false
- type: dropdown
attributes:
label: Store
description: Which launcher/store do you use to launch your game?
multiple: false
options:
- Steam
- Epic Games
- Rockstar
- Other (please mention in "Additional context")
validations:
required: true
- type: dropdown
attributes:
label: Language
description: Which language do you have Red Dead Redemption 2 set to?
multiple: false
options:
- English
- French
- Italian
- German
- Spanish
- Japanese
- Russian
- Polish
- Brazilian Portuguese
- Traditional Chinese
- Simplified Chinese
- Latin American Spanish
- Korean
validations:
required: true
- type: textarea
attributes:
label: Additional context
description: Add any other context about the problem here.
validations:
required: false
- type: checkboxes
attributes:
label: Build
description: We want to confirm that this issue exists on the latest version of HorseMenu, not a fork or your own version of HorseMenu.
options:
- label: I've confirmed the issue exists on the latest version of HorseMenu
required: true
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/build_issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build issue
description: Report a problem with building HorseMenu
title: "[Build]: "
labels: build
body:
- type: textarea
attributes:
label: Describe the build issues
description: A clear and concise description of what the issue is.
validations:
required: true
- type: textarea
attributes:
label: Screenshots and/or Logs
description: "Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in."
value: |
```
<paste your logs here>
```
validations:
required: false
- type: dropdown
attributes:
label: IDE/Compiler
description: Which IDE do you use to build HorseMenu?
multiple: false
options:
- Visual Studio 2022
- Visual Studio Code
- Command Line
- Other (please mention in "Additional context")
validations:
required: true
- type: textarea
attributes:
label: Additional context
description: Add any other context about the problem here.
validations:
required: false
- type: checkboxes
attributes:
label: HorseMenu Source Code
description: You confirm that you haven't modified HorseMenu and are building the latest version of the source code.
options:
- label: I've confirmed this is an issue with building unmodified HorseMenu.
required: true
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Feature request
description: Suggest an idea for this project
title: "[Request]: "
labels: request
body:
- type: textarea
attributes:
label: Problem
description: "Is your feature request related to a problem? Please describe."
placeholder: "A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]"
validations:
required: false
- type: textarea
attributes:
label: Solution
description: "Describe the solution you'd like"
placeholder: "A clear and concise description of what you want to happen."
validations:
required: true
- type: textarea
attributes:
label: Reason
description: Provide Reasoning
placeholder: "Tell us why you'd want for us to add this to HorseMenu."
validations:
required: true
- type: textarea
attributes:
label: Additional context
description: |
Add any other context about the request here.
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/improvement_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Improvement request
description: Improve an existing feature in YimMenu.
title: "[Improvement]: "
labels: enhancement
body:
- type: textarea
attributes:
label: Which feature
description: "Explain to us which feature you want to see improved and what you'd like to be changed about it."
placeholder: "I'd like for the Settings -> ESP feature to be structured differently, currently it's too obscure on how each of the features work together."
validations:
required: false
- type: textarea
attributes:
label: Reason
description: Provide Reasoning
placeholder: "Tell us why you'd want for us to improve this feature in HorseMenu."
validations:
required: true
- type: textarea
attributes:
label: Additional context
description: |
Add any other context about the request here.
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
14 changes: 8 additions & 6 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Nightly Build
on:
schedule:
# cronjob that triggers every day at 2PM UTC
- cron: '0 14 * * *'
- cron: "0 14 * * *"
workflow_dispatch:

jobs:
Expand All @@ -27,16 +27,18 @@ jobs:
arch: amd64

- name: Generate CMake project
run: cmake -D CMAKE_BUILD_TYPE=Release -S. -Bbuild -G Ninja
run: cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo -D OPTIMIZE=YES -S. -Bbuild -G Ninja

- name: Build 64bit release DLL
run: cmake --build ./build --config Release --target HorseMenu --
run: cmake --build ./build --config RelWithDebInfo --target HorseMenu --

- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: binary
path: build/HorseMenu.dll
path: |
build/HorseMenu.dll
build/HorseMenu.pdb
- name: Generate Build Info
id: var
Expand All @@ -62,7 +64,7 @@ jobs:
create_release:
runs-on: ubuntu-latest
name: Create Release
needs: [ check_date, build_nightly ]
needs: [check_date, build_nightly]
if: ${{ needs.check_date.outputs.should_run != 'false' }}
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -112,4 +114,4 @@ jobs:
${{ needs.build_nightly.outputs.full_sha }}
```
files: |
HorseMenu.dll
HorseMenu.dll
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,13 @@ target_include_directories(${PROJECT_NAME} PRIVATE
)

message(STATUS "Setting up linked libraries")
target_link_libraries(${PROJECT_NAME} PRIVATE AsyncLogger imgui minhook nlohmann_json::nlohmann_json dbghelp "${DEPS_DIR}/vulkan-1.lib")
target_link_libraries(${PROJECT_NAME} PRIVATE AsyncLogger imgui minhook nlohmann_json::nlohmann_json dbghelp "${DEPS_DIR}/vulkan-1.lib")

add_compile_definitions(${PROJECT_NAME} "_CRT_SECURE_NO_WARNINGS" "NOMINMAX" "WIN32_LEAN_AND_MEAN")

if(MSVC)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /LTCG /OPT:REF,ICF /GUARD:NO")

set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /O2 /Ox /Oi /Ot /Oy /Ob3 /sdl- /GL /GF /GS- /Gw")
string(REPLACE "/Ob1" "/Ob3" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
endif()
2 changes: 1 addition & 1 deletion cmake/rdr-classes.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include(FetchContent)
FetchContent_Declare(
rdr_classes
GIT_REPOSITORY https://github.com/YimMenu/RDR-Classes.git
GIT_TAG 1d566f23329b756aa3ef57be7b53525d949af14a
GIT_TAG 79b0389bcfc7a616290ec3ec97ce4fa6a574d0ed
GIT_PROGRESS TRUE
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
Expand Down
2 changes: 0 additions & 2 deletions src/common.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#pragma once
#define WIN32_LEAN_AND_MEAN
#define NOMINMAX

#include <AsyncLogger/Logger.hpp>
#include <MinHook.h>
Expand Down
5 changes: 1 addition & 4 deletions src/core/byte_patch_manager/byte_patch_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ namespace YimMenu
void Byte_Patch_Manager::InitImpl()
{
// put patches here
// example usage:
//
//BytePatch::Make(Pointers.GetLocalPed,0)->apply();

LOG(INFO) << "Byte patch manager initialized";
LOG(INFO) << "Byte Patch Manager initialized";
}

void Byte_Patch_Manager::Init()
Expand Down
4 changes: 3 additions & 1 deletion src/core/commands/Command.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#pragma once
#include "util/Joaat.hpp"

#include <nlohmann/json.hpp>


namespace YimMenu
{
class Command
Expand All @@ -12,7 +14,7 @@ namespace YimMenu
std::string m_Description;
joaat_t m_Hash;

int m_NumArgs = 0; // TODO: currently unused
int m_NumArgs = 0; // TODO: currently unused

protected:
virtual void OnCall() = 0;
Expand Down
1 change: 1 addition & 0 deletions src/core/hooking/Hooking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ namespace YimMenu
BaseHook::Add<Hooks::Info::PlayerHasLeft>(new DetourHook("PlayerHasLeft", Pointers.PlayerHasLeft, Hooks::Info::PlayerHasLeft));

BaseHook::Add<Hooks::Spoofing::WritePlayerHealthData>(new DetourHook("WritePlayerHealthData", Pointers.WritePlayerHealthData, Hooks::Spoofing::WritePlayerHealthData));
BaseHook::Add<Hooks::Spoofing::SendNetInfoToLobby>(new DetourHook("SendNetInfoToLobby", Pointers.SendNetInfoToLobby, Hooks::Spoofing::SendNetInfoToLobby));
}

Hooking::~Hooking()
Expand Down
2 changes: 1 addition & 1 deletion src/core/settings/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace YimMenu
for (auto& serializer : m_StateSerializers)
LoadComponentImpl(serializer);

LOG(VERBOSE) << "m_InitialLoadDone = true";
LOG(VERBOSE) << "Initial Settings Load Completed";
m_InitialLoadDone = true;
}

Expand Down
27 changes: 23 additions & 4 deletions src/game/features/Features.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
#include "Features.hpp"
#include "game/rdr/Natives.hpp"

#include "core/commands/BoolCommand.hpp"
#include "core/commands/Commands.hpp"
#include "core/commands/HotkeySystem.hpp"
#include "core/frontend/Notifications.hpp"
#include "game/backend/FiberPool.hpp"
#include "game/backend/ScriptMgr.hpp"
#include "game/backend/Players.hpp"
#include "game/rdr/Enums.hpp"
#include "game/frontend/GUI.hpp"
#include "game/backend/ScriptMgr.hpp"
#include "game/frontend/ContextMenu.hpp"
#include "game/frontend/GUI.hpp"
#include "game/rdr/Enums.hpp"
#include "game/rdr/Natives.hpp"


namespace YimMenu::Features
{
BoolCommand _IsFirstLoadComplete{"firstloadcomplete", "Is First Load Complete", "Used to detect if the first load has been completed or not."};
}

namespace YimMenu
{
Expand Down Expand Up @@ -83,8 +91,19 @@ namespace YimMenu
});
}

void TryFirstLoad()
{
if (!Features::_IsFirstLoadComplete.GetState())
{
Commands::GetCommand<BoolCommand>("detectspoofednames"_J)->SetState(true);
Features::_IsFirstLoadComplete.SetState(true);
}
}

void FeatureLoop()
{
TryFirstLoad();

while (true)
{
Players::Tick();
Expand Down
1 change: 0 additions & 1 deletion src/game/features/mount/KeepHorseBarsFilled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

namespace YimMenu::Features
{
// TODO: this should be moved out of self
class KeepHorseBarsFilled : public LoopedCommand
{
using LoopedCommand::LoopedCommand;
Expand Down
1 change: 0 additions & 1 deletion src/game/features/mount/KeepHorseCoresFilled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

namespace YimMenu::Features
{
// TODO: this should be moved out of self
class KeepHorseCoresFilled : public LoopedCommand
{
using LoopedCommand::LoopedCommand;
Expand Down
Loading

0 comments on commit 91e173c

Please sign in to comment.