Skip to content

Commit

Permalink
tank bunker check use YR function
Browse files Browse the repository at this point in the history
  • Loading branch information
Aephiex authored Dec 24, 2024
1 parent 117add1 commit 2804cdc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Commands/AutoLoad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,8 @@ inline static const bool CanBeBuildingPassenger(TechnoClass* pPassenger)
else if (pPassenger->WhatAmI() == AbstractType::Unit)
{
// Tank Bunker
return pPassenger->GetTechnoType()->Turret
&& pPassenger->GetTechnoType()->Bunkerable
&& pPassenger->GetTechnoType()->SpeedType != SpeedType::Hover
&& !IsParasited(pPassenger);
// This is the YR function to check if something can be bunkered.
return reinterpret_cast<bool(__thiscall*)(TechnoClass*)>(0x70FB50)(pPassenger);
}
return false;
}
Expand Down

0 comments on commit 2804cdc

Please sign in to comment.