3
3
#include " mk10utils.h"
4
4
#include " mk10menu.h"
5
5
#include < iostream>
6
- #include " ..\dxhook.h"
7
6
#include " eSettingsManager.h"
8
7
#include " eNotifManager.h"
8
+ #include " MKCamera.h"
9
9
#include < imgui.h>
10
10
11
11
@@ -127,6 +127,11 @@ void MK10::SetCharacterPosition(FVector * vec, PLAYER_NUM plr)
127
127
((int64 (__fastcall*)(int64, FVector*))_addr (0x140CBF720 ))(ptr, vec);
128
128
}
129
129
130
+ void MK10::SetCharacterMeter (int64 obj, float meter)
131
+ {
132
+ ((void (__fastcall*)(int64, float ))_addr (0x14055EC40 ))(obj, meter);
133
+ }
134
+
130
135
int64 MK10Hooks::IsNPCCharacter (const char * character)
131
136
{
132
137
int64 result = 0 ;
@@ -193,7 +198,7 @@ void __fastcall MK10Hooks::HookProcessStuff()
193
198
if (TheMenu->b1HealthPlayer1 )
194
199
MK10::GetCharacterObject (PLAYER1)->SetLife (0 .01f );
195
200
if (TheMenu->bInfiniteSuperBarPlayer1 )
196
- MK10::GetCharacterObject ( PLAYER1)-> SetMeter ( 1 .0f );
201
+ MK10::SetCharacterMeter ( MK10::GetCharacterInfo ( PLAYER1), 1 .0f );
197
202
}
198
203
if (MK10::GetCharacterObject (PLAYER2))
199
204
{
@@ -204,7 +209,7 @@ void __fastcall MK10Hooks::HookProcessStuff()
204
209
if (TheMenu->b1HealthPlayer2 )
205
210
MK10::GetCharacterObject (PLAYER2)->SetLife (0 .01f );
206
211
if (TheMenu->bInfiniteSuperBarPlayer2 )
207
- MK10::GetCharacterObject ( PLAYER2)-> SetMeter ( 1 .0f );
212
+ MK10::SetCharacterMeter ( MK10::GetCharacterInfo ( PLAYER2), 1 .0f );
208
213
}
209
214
210
215
@@ -256,7 +261,16 @@ void __fastcall MK10Hooks::HookProcessStuff()
256
261
MK10::SetCharacterPosition (&TheMenu->plrPos , PLAYER2);
257
262
}
258
263
264
+ if (TheMenu->bForceMoveCamera )
265
+ {
266
+ if (TheCamera)
267
+ {
268
+ TheCamera->HookedSetPosition (&TheMenu->camPos );
269
+ TheCamera->HookedSetRotation (&TheMenu->camRot );
270
+ TheCamera->SetFOV (TheMenu->camFov );
271
+ }
259
272
273
+ }
260
274
261
275
262
276
@@ -379,3 +393,22 @@ int64 __fastcall MK10Hooks::HookGetCharacterVictory(const char * name, const cha
379
393
380
394
return ((int64 (__fastcall*)(const char *, const char *, char *, int ))_addr (0x140553850 ))(newName,packageID,packageName,packageBuffer);
381
395
}
396
+
397
+ void MK10Hooks::HookDispatch (int64 ptr, int a2)
398
+ {
399
+ if (TheMenu->bHookDispatch )
400
+ {
401
+ int64 arg = *(int64*)(ptr);
402
+
403
+ if (!TheMenu->bFreezeWorld )
404
+ a2 = *(uint32_t *)(ptr + 0x18 );
405
+
406
+ if (*(uint32_t *)(ptr + 0x14 ) == a2)
407
+ return ;
408
+
409
+ *(int *)(ptr + 0x14 ) = a2;
410
+ ((void (*)(int64, int ))*(int64*)(arg + 0xD8 ))(ptr, a2);
411
+ }
412
+ else
413
+ ((int64 (__fastcall*)(int64, int ))_addr (0x140875590 ))(ptr, a2);
414
+ }
0 commit comments