Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -860,3 +860,4 @@ This page lists all the individual contributions to the project by their author.
- Multiplayer gamespeed fix for RealTimeTimers
- Revert Ares patch to allow OpenTopped transport customization
- Fix for units with Fly, Jumpjet or Rocket locomotors crashing off-map not being cleaned up
- Fix for mirage tanks (and other vehicles disguised as terrain) incorrectly displaying veterancy insignia to enemy players when not clearly visible
1 change: 1 addition & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,7 @@ HideShakeEffects=false ; boolean
- Fixed a bug where stationary vehicles would also block movement caused by external factors (by Noble_Fish)
- Fixed AttachEffect with `RecreationDelay` of 0 checking `Delay` as well instead of immediately refreshing duration when possible (by Starkku)
- Fixed building interceptors being able to pick targets during construction and selling (by Starkku)
- Fixed mirage tanks (and other vehicles disguised as terrain) incorrectly displaying veterancy insignia to enemy players when not clearly visible (by RAZER)

#### Fixes / interactions with other extensions:
- Taking over Ares' AlphaImage respawn logic to reduce lags from it (by NetsuNegi)
Expand Down
17 changes: 11 additions & 6 deletions src/Ext/Techno/Body.Visuals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,21 @@ void TechnoExt::DrawInsignia(TechnoClass* pThis, Point2D* pLocation, RectangleSt
auto pOwner = pThis->Owner;
const bool isObserver = HouseClass::IsCurrentPlayerObserver();

if (pThis->IsDisguised() && !pThis->IsClearlyVisibleTo(HouseClass::CurrentPlayer) && !(isObserver
|| EnumFunctions::CanTargetHouse(RulesExt::Global()->DisguiseBlinkingVisibility, HouseClass::CurrentPlayer, pOwner)))
if (pThis->IsDisguised() && !pThis->IsClearlyVisibleTo(HouseClass::CurrentPlayer) && !isObserver)
{
if (auto const pType = TechnoTypeExt::GetTechnoType(pThis->Disguise))
{
pTechnoType = pType;
pTechnoTypeExt = TechnoTypeExt::ExtMap.Find(pType);
pOwner = pThis->DisguisedAsHouse;
// Disguised as a techno: borrow its insignia, unless blinking visibility reveals the real unit.
if (!EnumFunctions::CanTargetHouse(RulesExt::Global()->DisguiseBlinkingVisibility, HouseClass::CurrentPlayer, pOwner))
{
pTechnoType = pType;
pTechnoTypeExt = TechnoTypeExt::ExtMap.Find(pType);
pOwner = pThis->DisguisedAsHouse;
}
}
else if (pThis->Disguise->WhatAmI() == AbstractType::TerrainType && (!isObserver && !pOwner->IsAlliedWith(HouseClass::CurrentPlayer)))
else if (pThis->Disguise->WhatAmI() == AbstractType::TerrainType && !pOwner->IsAlliedWith(HouseClass::CurrentPlayer))
{
// Disguised as terrain (e.g. mirage tank as a tree): terrain has no insignia.
return;
}
}
Expand Down Expand Up @@ -873,3 +877,4 @@ void TechnoExt::ShowPromoteAnim(TechnoClass* pThis)
else if (!eliteAnims.empty())
AnimExt::CreateRandomAnim(eliteAnims, pThis->GetCenterCoords(), pThis, pThis->Owner, true, true);
}

Loading