-
Notifications
You must be signed in to change notification settings - Fork 742
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from EtoShinya/main
feat: Added FovChanger
- Loading branch information
Showing
8 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include "FovChanger.h" | ||
#include "HookManager.h" | ||
#include "Utils.h" | ||
#include "game-utils.hpp" | ||
#include "events.h" | ||
|
||
namespace Cheat::Features | ||
{ | ||
FovChanger::FovChanger() | ||
{ | ||
HookManager::install(app::Camera_set_fieldOfView, Camera_set_fieldOfView_Hook); | ||
} | ||
|
||
void FovChanger::Camera_set_fieldOfView_Hook(void* __this, float value, MethodInfo* method) | ||
{ | ||
if (vars.b_FovChanger) | ||
value = vars.f_Fov; | ||
CALL_ORIGIN(Camera_set_fieldOfView_Hook, __this, value, method); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#pragma once | ||
#include "Singleton.h" | ||
#include "global.h" | ||
|
||
namespace Cheat::Features | ||
{ | ||
class FovChanger : public Singleton<FovChanger> | ||
{ | ||
public: | ||
FovChanger(); | ||
|
||
private: | ||
static void Camera_set_fieldOfView_Hook(void* __this, float value, MethodInfo* method); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters