Simplified the code in the previous commit

This commit is contained in:
NovaRain
2021-10-10 10:28:41 +08:00
parent 93c6cf5222
commit 4bcf96dfe8
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -485,10 +485,9 @@ static void __declspec(naked) obj_use_container_hook() {
static const DWORD obj_use_container_ExitRet = 0x49D069;
using namespace Fields;
__asm {
mov ebx, [ecx + currFrame]; // obj.cur_frm
cmp ebx, 1; // grave type containers in the open state?
je skip; // skip animation
jmp register_begin_; // vanilla behavior
cmp dword ptr [ecx + currFrame], 1; // grave type containers in the open state?
je skip; // skip animation
jmp register_begin_; // vanilla behavior
skip:
add esp, 4;
cmp edi, ds:[FO_VAR_obj_dude];
+1 -1
View File
@@ -397,7 +397,7 @@ long __stdcall sfgame_item_weapon_range(TGameObj* source, TGameObj* weapon, long
static int fastShotTweak;
static long item_w_mp_cost_sub(TGameObj* source, TGameObj* item, long hitMode, long isCalled, long cost) {
static long __stdcall item_w_mp_cost_sub(TGameObj* source, TGameObj* item, long hitMode, long isCalled, long cost) {
if (isCalled) cost++;
if (cost < 0) cost = 0;