Originally Posted by
oiramario
Thanks for your sharing, after some hard work, OnSpriteLeftClick and OnSpriteRightClick now worked well both. They never crash even put them in while(True).
In my knowledge background, modern engine use multithread with renderring. It means dx9's endscene or dx11's present are not in mainthread, so dont hook them anymore. Here is the better solution:
ntoskrnl | Hooking Threads Without Detours or Patches
P.S. My bot could set facing by write mem, however it does not sync to server. Anyone could share the UpdateMovement address or some hints?
Why not just use the CTM wrapper you posted for changing facing angle, that handles sending the packet update so your facing direction will be in sync with server
Code:
void CTM::FaceTo(float_t angle) {
reinterpret_cast<int32_t(__fastcall*)(CGUnit*, float_t)>(Module::BaseAddress() + 0xAB6AB0)(Core::LocalPlayer(), angle);
}