Fixed broken critter art debug message

(caused by commit a34aa64c)
This commit is contained in:
NovaRain
2025-03-08 19:49:00 +08:00
parent e18df80980
commit 3a29db5f90
3 changed files with 8 additions and 9 deletions
+1 -1
View File
@@ -543,7 +543,7 @@ dudeFix:
jnz equipped;
xor eax, eax;
equipped:
or cl, 1; // reset ZF
or ecx, 1; // reset ZF
retn;
}
}
+1 -1
View File
@@ -88,7 +88,7 @@ static __declspec(naked) void critter_check_poison_hack_fix() {
retn;
notDude:
call critter_check_poison_fix;
or al, 1; // unset ZF (exit from func)
or eax, 1; // unset ZF (exit from func)
retn;
}
}
+6 -7
View File
@@ -329,12 +329,12 @@ artNotExist:
static __declspec(naked) void art_data_size_hook_check() {
using namespace fo;
__asm {
xor esi, esi;
mov eax, ebx; // ebx - FID
shr eax, 16; // al - animation code (ID2)
cmp al, ANIM_walk;
cmove ecx, esi;
__asm { // ecx = -1
xor eax, eax;
mov edx, ebx; // ebx - FID
shr edx, 16; // dl - animation code (ID2)
cmp dl, ANIM_walk;
cmove eax, ecx; // -1 - skip critter art debug message
retn;
}
}
@@ -611,7 +611,6 @@ void DebugEditor::init() {
HookCall(0x419B65, art_data_size_hook);
// Checks the animation code, if ANIM_walk then skip printing the debug message
HookCall(0x419AA0, art_data_size_hook_check);
SafeWrite8(0x419B61, CodeType::JumpNZ); // jz > jnz
// Notifies and prints a debug message about a corrupted proto file to debug.log
MakeCall(0x4A1D73, proto_load_pid_hack, 6);