diff --git a/sfall/Modules/Combat.cpp b/sfall/Modules/Combat.cpp index 64f1141d9..7d9567af6 100644 --- a/sfall/Modules/Combat.cpp +++ b/sfall/Modules/Combat.cpp @@ -168,8 +168,8 @@ static double ApplyModifiers(std::vector* mods, fo::GameObjec static DWORD __fastcall CalcKnockbackMod(int knockValue, int damage, fo::GameObject* weapon, fo::GameObject* attacker, fo::GameObject* target) { double result = (double)damage / (double)knockValue; - result = ApplyModifiers(&mWeapons, weapon, result); - result = ApplyModifiers(&mAttackers, attacker, result); + if (weapon) result = ApplyModifiers(&mWeapons, weapon, result); + if (attacker) result = ApplyModifiers(&mAttackers, attacker, result); result = ApplyModifiers(&mTargets, target, result); return (DWORD)floor(result); } @@ -192,9 +192,9 @@ static void __declspec(naked) compute_dmg_damage_hack() { __asm { push ecx push esi; // Target - mov eax, -1; - push eax; // Attacker - push eax; // Weapon + xor eax, eax; + push eax; // Attacker (no attacker) + push eax; // Weapon (no weapon) mov edx, ebx; // Damage mov ecx, 10; // Knockback value call CalcKnockbackMod; diff --git a/sfall/ddraw.vcxproj b/sfall/ddraw.vcxproj index 8be8f4786..dd2c7fd92 100644 --- a/sfall/ddraw.vcxproj +++ b/sfall/ddraw.vcxproj @@ -148,7 +148,7 @@ Sync MultiThreaded false - NotSet + NoExtensions Fast false false @@ -197,7 +197,7 @@ Sync MultiThreaded false - NotSet + NoExtensions Fast false false @@ -246,7 +246,7 @@ Sync MultiThreaded false - NotSet + NoExtensions Fast false false diff --git a/sfall/version.h b/sfall/version.h index 13870dd9c..53164aac6 100644 --- a/sfall/version.h +++ b/sfall/version.h @@ -25,9 +25,9 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 1 #define VERSION_BUILD 8 -#define VERSION_REV 0 +#define VERSION_REV 1 -#define VERSION_STRING "4.1.8" +#define VERSION_STRING "4.1.8.1" //#define CHECK_VAL (4)