diff --git a/src/HardEndStuff/Ra2Mode.cpp b/src/HardEndStuff/Ra2Mode.cpp index 1412f74b..e022998d 100644 --- a/src/HardEndStuff/Ra2Mode.cpp +++ b/src/HardEndStuff/Ra2Mode.cpp @@ -178,23 +178,6 @@ bool Ra2Mode::CheckSaveGameID(const char* saveGameName) return false; } -// Allow allies to repair on service depot -DEFINE_HOOK(0x700594, TechnoClass_WhatAction__AllowAlliesRepair, 0x5) -{ - if (!Ra2Mode::IsEnabled()) - return 0; - - GET(TechnoClass*, pThis, ESI); - GET(ObjectClass*, pObject, EDI); - - auto const pBuilding = abstract_cast(pObject); - auto const pBuildingOwner = pBuilding ? pBuilding->Owner : nullptr; - - return (pBuildingOwner && pBuildingOwner->IsAlliedWith(pThis)) - ? 0x70059D - : 0x7005E6; -} - // Allow to repair the BlackHawk Transport on service depot #pragma region AllowRepairFlyMZone diff --git a/src/Misc/Observers.Visibility.cpp b/src/Misc/Observers.Visibility.cpp index 619d2f5a..7d05347c 100644 --- a/src/Misc/Observers.Visibility.cpp +++ b/src/Misc/Observers.Visibility.cpp @@ -165,6 +165,15 @@ DEFINE_HOOK(0x4AE62B, DisplayClass_HelpText_Cloak, 0x5) return CheckSensedByHouses; } +// Allow showing the select cursor on the object +DEFINE_HOOK(0x700594, TechnoClass_WhatAction__AllowAllies, 0x5) +{ + GET(TechnoClass*, pThis, ESI); + GET(ObjectClass*, pObject, EDI); + + return pThis->Owner->IsAlliedWith(pObject) ? 0x70059D : 0x7005E6; +} + // Show disguised units (Spy and Mirage) for observer #pragma region // Show spy for observer