Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
chaserli committed Mar 10, 2024
1 parent 0bb085a commit 9b2118b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
3 changes: 3 additions & 0 deletions src/Misc/Observers.Visibility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ DEFINE_HOOK(0x4AE62B, DisplayClass_HelpText_Cloak, 0x5)
return CheckSensedByHouses;
}

// Allow showing the select cursor on the object
DEFINE_JUMP(LJMP, 0x70056C, 0x70059D);

// Show disguised units (Spy and Mirage) for observer
#pragma region
// Show spy for observer
Expand Down
16 changes: 1 addition & 15 deletions src/Spawner/Ra2Mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,21 +173,7 @@ void __fastcall Ra2Mode::DetectDisguiseHack::Sensors_RemOfHouse(CellClass* pThis
#pragma endregion DetectDisguiseHack

// 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<BuildingClass* const>(pObject);
auto const pBuildingOwner = pBuilding ? pBuilding->Owner : nullptr;

return (pBuildingOwner && pBuildingOwner->IsAlliedWith(pThis))
? 0x70059D
: 0x7005E6;
}
// GOTO Observers.Visibility.cpp

// Allow to repair the BlackHawk Transport on service depot
#pragma region AllowRepairFlyMZone
Expand Down

0 comments on commit 9b2118b

Please sign in to comment.