Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ermaccer committed Jan 29, 2021
1 parent 19def62 commit 44331ef
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 3 deletions.
Binary file modified MK11Hook/MK11Hook.aps
Binary file not shown.
Binary file modified MK11Hook/MK11Hook.rc
Binary file not shown.
13 changes: 12 additions & 1 deletion MK11Hook/code/mk11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ void __fastcall MK11Hooks::HookProcessStuff()
if (MK11::GetCharacterObject(PLAYER2))
MK11::SetCharacterSpeed(PLAYER2, TheMenu->fPlayer2Speed);
}

if (TheMenu->bChangePlayerScale)
{
if (MK11::GetCharacterObject(PLAYER1))
MK11::SetCharacterScale(PLAYER1, &TheMenu->fPlayer1Scale);
if (MK11::GetCharacterObject(PLAYER2))
MK11::SetCharacterScale(PLAYER2, &TheMenu->fPlayer2Scale);
}

if (TheMenu->bInfiniteHealthPlayer1)
{
Expand Down Expand Up @@ -578,6 +584,11 @@ void MK11::SetCharacterSpeed(PLAYER_NUM plr, float speed)
((void(__fastcall*)(int64, float))_mk11addr(0x1404C3D50))(MK11::GetCharacterObject(plr), speed);
}

void MK11::SetCharacterScale(PLAYER_NUM plr, FVector* scale)
{
((void(__fastcall*)(int64, FVector*))_mk11addr(0x141161920))(MK11::GetCharacterObject(plr), scale);
}

void MK11::SlowGameTimeForXTicks(float speed, int ticks)
{

Expand Down
5 changes: 4 additions & 1 deletion MK11Hook/code/mk11.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#define PLAYER_STRUCTS 0x14348E558


#define MK11HOOK_VERSION "0.3.2"
#define MK11HOOK_VERSION "0.3.3"

enum PLAYER_NUM
{
Expand Down Expand Up @@ -60,13 +60,16 @@ namespace MK11 {


void SetCharacterSpeed(PLAYER_NUM plr, float speed);
void SetCharacterScale(PLAYER_NUM plr, FVector* scale);

void SlowGameTimeForXTicks(float speed, int ticks);
void SetSpeed(float speed);


void SetCharacterLife(int64 obj, float life);
void SetCharacterMeter(int64 obj, float meter);


void __fastcall CamSetPos(int64 ptr, FVector* pos);
void __fastcall CamSetRot(int64 ptr, FRotator* rot);

Expand Down
17 changes: 17 additions & 0 deletions MK11Hook/code/mk11menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ void MK11Menu::Initialize()
fPlayer2Speed = 1.0f;


bChangePlayerScale = false;
fPlayer1Scale = { 1.0f,1.0f,1.0f };
fPlayer2Scale = { 1.0f,1.0f,1.0f };

bInfiniteHealthPlayer1 = false;
bInfiniteHealthPlayer2 = false;
bInfiniteSuperBarPlayer1 = false;
Expand Down Expand Up @@ -275,6 +279,19 @@ void MK11Menu::Draw()
fPlayer1Speed = 1.0f;
fPlayer2Speed = 1.0f;
}

ImGui::Separator();
ImGui::Checkbox("Change Player Scale", &bChangePlayerScale);
ImGui::InputFloat3("Player 1 ", &fPlayer1Scale.X);
ImGui::InputFloat3("Player 2 ", &fPlayer2Scale.X);

bool scale_reset = ImGui::Button("Reset Scale");
if (scale_reset)
{
fPlayer1Scale = { 1.0f,1.0f,1.0f };
fPlayer2Scale = { 1.0f,1.0f,1.0f };
}

ImGui::Separator();
ImGui::Text("Position");
ImGui::SameLine(); ShowHelpMarker("Preview only!");
Expand Down
4 changes: 3 additions & 1 deletion MK11Hook/code/mk11menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ class MK11Menu {
float fPlayer1Speed;
float fPlayer2Speed;


bool bChangePlayerScale;
FVector fPlayer1Scale;
FVector fPlayer2Scale;

// cheats
bool bStopTimer;
Expand Down

0 comments on commit 44331ef

Please sign in to comment.