diff --git a/CAPI/cpp/API/src/API.cpp b/CAPI/cpp/API/src/API.cpp index 69bf5e3b..0059658d 100755 --- a/CAPI/cpp/API/src/API.cpp +++ b/CAPI/cpp/API/src/API.cpp @@ -290,7 +290,7 @@ std::future 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独有 diff --git a/CAPI/cpp/API/src/DebugAPI.cpp b/CAPI/cpp/API/src/DebugAPI.cpp index 189d7b02..c2641e32 100755 --- a/CAPI/cpp/API/src/DebugAPI.cpp +++ b/CAPI/cpp/API/src/DebugAPI.cpp @@ -239,7 +239,7 @@ std::shared_ptr 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