mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Simplified the code in the previous commit
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user