Skip to content

Commit fd36e64

Browse files
committed
update
1 parent 072de31 commit fd36e64

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

src/HardEndStuff/Ra2Mode.cpp

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

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

src/Misc/Observers.Visibility.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,15 @@ DEFINE_HOOK(0x4AE62B, DisplayClass_HelpText_Cloak, 0x5)
165165
return CheckSensedByHouses;
166166
}
167167

168+
// Allow showing the select cursor on the object
169+
DEFINE_HOOK(0x700594, TechnoClass_WhatAction__AllowAllies, 0x5)
170+
{
171+
GET(TechnoClass*, pThis, ESI);
172+
GET(ObjectClass*, pObject, EDI);
173+
174+
return pThis->Owner->IsAlliedWith(pObject) ? 0x70059D : 0x7005E6;
175+
}
176+
168177
// Show disguised units (Spy and Mirage) for observer
169178
#pragma region
170179
// Show spy for observer

0 commit comments

Comments
 (0)