Revert "Fixed a bug when using HOOK_ITEMDAMAGE and calling item_w_damage_ engine function at the same time. It would result in player self-damaging when attacking targets."

This reverts commit 4194feafdf.
This commit is contained in:
NovaRain
2018-04-13 20:42:09 +08:00
parent 4194feafdf
commit 29910e98bf
3 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -184,10 +184,10 @@ WorldMapSlots=0
;PatchFile=patch%03d.dat
;MultiPatches=0
;Set to 1 to use the modified data load order for the engine to find game data
;Set to 1 to enable the modified data load order for the engine to find game data
;Original: patchXXX.dat > critter_patches > critter_dat > f2_res_patches > f2_res_dat > master_patches > master_dat
;Modified: master_patches > critter_patches > patchXXX.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
DataLoadOrderPatch=1
DataLoadOrderPatch=0
;To change the default and starting player models, uncomment the next four lines.
;The default models can also be changed ingame via script
+6 -6
View File
@@ -231,13 +231,13 @@ static void __declspec(naked) ItemDamageHook() {
mov args[0], eax; //min
mov args[4], edx; //max
mov args[8], edi; //weapon
mov args[12], ecx; //source
test edi, edi; //has a weapon in hand?
jnz skip; //yes
add esi, 8; //edit hit_mode
skip:
mov args[16], esi; //hit_mode
mov args[12], ecx; //critter
mov args[16], esi; //type
mov args[20], ebp; //non-zero for weapon melee attack
test edi, edi;
jnz skip;
add args[16], 8;
skip:
pushad;
push HOOK_ITEMDAMAGE;
call RunHookScript;
+1 -1
View File
@@ -93,7 +93,7 @@ skip:
}
void LoadOrder::init() {
if (GetConfigInt("Misc", "DataLoadOrderPatch", 1)) {
if (GetConfigInt("Misc", "DataLoadOrderPatch", 0)) {
dlog("Applying data load order patch.", DL_INIT);
MakeCall(0x444259, game_init_databases_hack1);
MakeCall(0x4442F1, game_init_databases_hack2);