diff --git a/sfall/Animations.cpp b/sfall/Animations.cpp index cc3416fb..25e47152 100644 --- a/sfall/Animations.cpp +++ b/sfall/Animations.cpp @@ -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]; diff --git a/sfall/ReplacementFuncs.cpp b/sfall/ReplacementFuncs.cpp index 60f2f9db..ece4ce91 100644 --- a/sfall/ReplacementFuncs.cpp +++ b/sfall/ReplacementFuncs.cpp @@ -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;