Skip to content

Commit 5987dd0

Browse files
authored
Account for collision offset when picking target point of unit with no target bones (#145)
1 parent 8da86fe commit 5987dd0

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

hooks/CollisionOffsetFix.hook

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
# Moho::Unit::GetBoneWorldTransform(int)+77
3+
0x006AA637:
4+
# Here we are doing call to base class when there is no target bone.
5+
# In base class it takes center of collision box and returns it.
6+
mov ecx, esi # esi - Entity
7+
push 0xFFFFFFFF # -1
8+
mov eax, dword ptr [ebp + 8] # result transform
9+
push eax
10+
call 0x00679CE0 # Moho::VTransform * thiscall Moho::Entity::GetBoneWorldTransform(Moho::Entity *this, Moho::VTransform *result, int boneIndex)
11+
12+
pop edi # function return
13+
pop esi #
14+
mov esp, ebp #
15+
pop ebp #
16+
ret 8 #
17+
nop;nop;nop;nop;nop # 5 nops
18+
# There are 200 bytes of dead code. Perhaps we should make a file with such empty blocks to be used for hooking into bigger blocks.

0 commit comments

Comments
 (0)