mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Reverted the limit on hit chance (commit 71bc271)
* reason: the text length is depend on the frm.
This commit is contained in:
@@ -264,20 +264,10 @@ static void __declspec(naked) determine_to_hit_func_hack() {
|
||||
mov ecx, esi; // base (calculated hit chance)
|
||||
call HitChanceMod;
|
||||
mov esi, eax;
|
||||
mov eax, 999; // max
|
||||
cmp esi, eax;
|
||||
cmovg esi, eax;
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
static void __declspec(naked) determine_to_hit_func_hook_min() {
|
||||
__asm {
|
||||
mov esi, -99; // min
|
||||
jmp fo::funcoffs::debug_printf_;
|
||||
}
|
||||
}
|
||||
|
||||
bool Combat::IsBurstDisabled(fo::GameObject* critter) {
|
||||
for (size_t i = 0; i < noBursts.size(); i++) {
|
||||
if (noBursts[i] == critter->id) return true;
|
||||
@@ -579,10 +569,6 @@ void Combat::init() {
|
||||
MakeCall(0x424791, determine_to_hit_func_hack); // HitChanceMod
|
||||
BlockCall(0x424796);
|
||||
|
||||
// Add a minimum limit of -99% to the calculated hit chance to prevent display glitches
|
||||
SafeWrite8(0x42479D, -99); // was -100
|
||||
HookCall(0x4247A5, determine_to_hit_func_hook_min);
|
||||
|
||||
// Disables secondary burst attacks for the critter
|
||||
MakeCall(0x429E44, ai_pick_hit_mode_hack_noBurst, 1);
|
||||
|
||||
|
||||
@@ -36,12 +36,6 @@ static void __declspec(naked) ToHitHook() {
|
||||
__asm {
|
||||
cmp cRet, 1;
|
||||
cmovge ebx, rets[0];
|
||||
mov eax, 999; // max
|
||||
cmp ebx, eax;
|
||||
cmovg ebx, eax;
|
||||
mov eax, -99; // min
|
||||
cmp ebx, eax;
|
||||
cmovl ebx, eax;
|
||||
call EndHook;
|
||||
mov eax, ebx;
|
||||
retn 8;
|
||||
|
||||
Reference in New Issue
Block a user