Skip to content

Commit e3ca580

Browse files
committed
merge
1 parent 6065e12 commit e3ca580

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

src/CnCNetYR/Ra2Mode.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -179,23 +179,6 @@ bool Ra2Mode::CheckSaveGameID(const char* saveGameName)
179179
return false;
180180
}
181181

182-
// Allow allies to repair on service depot
183-
DEFINE_HOOK(0x700594, TechnoClass_WhatAction__AllowAlliesRepair, 0x5)
184-
{
185-
if (!Ra2Mode::IsEnabled())
186-
return 0;
187-
188-
GET(TechnoClass*, pThis, ESI);
189-
GET(ObjectClass*, pObject, EDI);
190-
191-
auto const pBuilding = abstract_cast<BuildingClass* const>(pObject);
192-
auto const pBuildingOwner = pBuilding ? pBuilding->Owner : nullptr;
193-
194-
return (pBuildingOwner && pBuildingOwner->IsAlliedWith(pThis))
195-
? 0x70059D
196-
: 0x7005E6;
197-
}
198-
199182
// Allow to repair the BlackHawk Transport on service depot
200183
#pragma region AllowRepairFlyMZone
201184

src/Misc/Observers.Visibility.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,15 @@ DEFINE_HOOK(0x4AE62B, DisplayClass_HelpText_Cloak, 0x5)
179179
return CheckSensedByHouses;
180180
}
181181

182+
// Allow showing the select cursor on the object
183+
DEFINE_HOOK(0x700594, TechnoClass_WhatAction__AllowAllies, 0x5)
184+
{
185+
GET(TechnoClass*, pThis, ESI);
186+
GET(ObjectClass*, pObject, EDI);
187+
188+
return pThis->Owner->IsAlliedWith(pObject) ? 0x70059D : 0x7005E6;
189+
}
190+
182191
// Show disguised units (Spy and Mirage) for observer
183192
#pragma region
184193
// Show spy for observer

0 commit comments

Comments
 (0)