From 536649a0101a9c4f6511ba5de6cebccadb0887b2 Mon Sep 17 00:00:00 2001 From: CCHyper <73803386+CCHyper@users.noreply.github.com> Date: Mon, 26 Dec 2022 14:01:20 +0000 Subject: [PATCH] Change ACTION_DAMAGE to ACTION_CAPTURE in InfantryClass::What_Action to ensure the mouse cursor displays correctly. --- src/extensions/infantry/infantryext_hooks.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/extensions/infantry/infantryext_hooks.cpp b/src/extensions/infantry/infantryext_hooks.cpp index 07f4d5c2f..2be82aa10 100644 --- a/src/extensions/infantry/infantryext_hooks.cpp +++ b/src/extensions/infantry/infantryext_hooks.cpp @@ -543,4 +543,13 @@ void InfantryClassExtension_Hooks() Patch_Jump(0x004D87E9, &_InfantryClass_Firing_AI_Mechanic_Patch); Patch_Jump(0x004D3A7B, &_InfantryClass_Per_Cell_Process_Transport_Attach_Sound_Patch); Patch_Jump(0x004D35F9, &_InfantryClass_Per_Cell_Process_Engineer_Capture_Damage_Patch); + + /** + * ACTION_DAMAGE no longer a case in DisplayClass::Left_Mouse_Up to show the + * correct mouse cursor for the multi-engineer damage (MOUSE.SHP also does not + * contain any artwork for this), so with the multi-engineer fixes above it shows + * the default arrow cursor. We fix this by making it use ACTION_CAPTURE still + * to make sure the mouse shows the correct visual cursor. + */ + Patch_Byte(0x004D7124+1, ACTION_CAPTURE); }