Added a patch to allow setting custom colors for object outlines

Added a tweak to ObjCanSeeObj_ShootThru_Fix to allow critters to see
through other critters.

Corrected some code.
This commit is contained in:
NovaRain
2020-08-05 16:10:28 +08:00
parent fd1067373a
commit 37b4a18770
7 changed files with 53 additions and 21 deletions
+5 -7
View File
@@ -417,16 +417,14 @@ void __declspec(naked) LoadOrder::art_get_name_hack() {
jne artHasAlias;
retn;
artHasAlias:
sub esp, 4;
mov edx, esp;
call fo::funcoffs::db_dir_entry_;
add esp, 4;
cmp eax, -1;
je artNotExist;
call fo::funcoffs::db_access_;
test eax, eax;
jz artNotExist;
mov aliasFID, -1;
mov eax, FO_VAR_art_name;
retn;
artNotExist:
dec eax; // -1
xchg eax, aliasFID
add esp, 4;
jmp art_get_name_Alias; // get name of art alias
@@ -471,7 +469,7 @@ void LoadOrder::init() {
dlogr(" Done", DL_INIT);
}
// Predefined behavior for replacing art aliases for critters
// Redefined behavior for replacing art aliases for critters
// first check the existence of the art file of the current critter and then replace the art alias if file not found
HookCall(0x419440, art_get_name_hook);
SafeWrite16(0x419521, 0x003B); // jmp 0x419560