Skip to content

Commit

Permalink
Merge pull request #354 from sigureling/dev
Browse files Browse the repository at this point in the history
fix api.HaveView parameter bug
  • Loading branch information
DragonAura authored May 11, 2024
2 parents 1f5815a + e7ae122 commit 66140a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CAPI/cpp/API/src/API.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ std::future<bool> ShipAPI::Construct(THUAI7::ConstructionType constructionType)
bool ShipAPI::HaveView(int32_t targetX, int32_t targetY) const
{
auto selfInfo = GetSelfInfo();
return logic.HaveView(targetX, targetY, selfInfo->x, selfInfo->y, selfInfo->viewRange);
return logic.HaveView(selfInfo->x, selfInfo->y, targetX, targetY, selfInfo->viewRange);
}

// Team独有
Expand Down
2 changes: 1 addition & 1 deletion CAPI/cpp/API/src/DebugAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ std::shared_ptr<const THUAI7::Ship> ShipDebugAPI::GetSelfInfo() const
bool ShipDebugAPI::HaveView(int32_t targetX, int32_t targetY) const
{
auto selfInfo = GetSelfInfo();
return logic.HaveView(targetX, targetY, selfInfo->x, selfInfo->y, selfInfo->viewRange);
return logic.HaveView(selfInfo->x, selfInfo->y, targetX, targetY, selfInfo->viewRange);
}

int32_t ShipDebugAPI::GetEnergy() const
Expand Down

0 comments on commit 66140a3

Please sign in to comment.