Browse Source

Merge branch 'dev' of github.com:eesast/THUAI6 into dev

tags/0.1.0
Shawqeem 2 years ago
parent
commit
f0160c32b1
12 changed files with 16 additions and 16 deletions
  1. +1
    -1
      CAPI/API/include/AI.h
  2. +1
    -1
      CAPI/API/include/API.h
  3. +1
    -1
      CAPI/API/include/constants.h
  4. +1
    -1
      CAPI/API/include/logic.h
  5. +1
    -1
      CAPI/API/include/state.h
  6. +1
    -1
      CAPI/API/include/utils.hpp
  7. +1
    -1
      CAPI/API/src/DebugAPI.cpp
  8. +5
    -5
      CAPI/API/src/logic.cpp
  9. +1
    -1
      CAPI/API/src/main.cpp
  10. +1
    -1
      dependency/proto/Protos.csproj
  11. +1
    -1
      logic/ClientTest/ClientTest.csproj
  12. +1
    -1
      logic/Server/Server.csproj

+ 1
- 1
CAPI/API/include/AI.h View File

@@ -28,4 +28,4 @@ public:
void play(IButcherAPI& api) override; void play(IButcherAPI& api) override;
}; };


#endif
#endif

+ 1
- 1
CAPI/API/include/API.h View File

@@ -367,4 +367,4 @@ private:
ILogic& logic; ILogic& logic;
}; };


#endif
#endif

+ 1
- 1
CAPI/API/include/constants.h View File

@@ -5,4 +5,4 @@
namespace Constants namespace Constants
{ {
} }
#endif
#endif

+ 1
- 1
CAPI/API/include/logic.h View File

@@ -151,4 +151,4 @@ public:
void Main(CreateAIFunc createAI, std::string IP, std::string port, bool level, std::string filename); void Main(CreateAIFunc createAI, std::string IP, std::string port, bool level, std::string filename);
}; };


#endif
#endif

+ 1
- 1
CAPI/API/include/state.h View File

@@ -25,4 +25,4 @@ struct State
std::vector<int64_t> guids; std::vector<int64_t> guids;
}; };


#endif
#endif

+ 1
- 1
CAPI/API/include/utils.hpp View File

@@ -297,4 +297,4 @@ namespace THUAI62Proto
} }
} // namespace THUAI62Proto } // namespace THUAI62Proto


#endif
#endif

+ 1
- 1
CAPI/API/src/DebugAPI.cpp View File

@@ -308,4 +308,4 @@ void HumanDebugAPI::Play(IAI& ai)
void ButcherDebugAPI::Play(IAI& ai) void ButcherDebugAPI::Play(IAI& ai)
{ {
ai.play(*this); ai.play(*this);
}
}

+ 5
- 5
CAPI/API/src/logic.cpp View File

@@ -233,7 +233,7 @@ void Logic::LoadBuffer(protobuf::MessageToClient& message)
bufferState->gamemap = Proto2THUAI6::Protobuf2THUAI6Map(message.map_message()); bufferState->gamemap = Proto2THUAI6::Protobuf2THUAI6Map(message.map_message());
if (playerType == THUAI6::PlayerType::HumanPlayer) if (playerType == THUAI6::PlayerType::HumanPlayer)
{ {
for (auto item : message.human_message())
for (const auto& item : message.human_message())
{ {
if (item.player_id() == playerID) if (item.player_id() == playerID)
{ {
@@ -241,7 +241,7 @@ void Logic::LoadBuffer(protobuf::MessageToClient& message)
} }
bufferState->humans.push_back(Proto2THUAI6::Protobuf2THUAI6Human(item)); bufferState->humans.push_back(Proto2THUAI6::Protobuf2THUAI6Human(item));
} }
for (auto item : message.butcher_message())
for (const auto& item : message.butcher_message())
{ {
int vr = this->bufferState->humanSelf->viewRange; int vr = this->bufferState->humanSelf->viewRange;
int deltaX = item.x() - this->bufferState->humanSelf->x; int deltaX = item.x() - this->bufferState->humanSelf->x;
@@ -277,7 +277,7 @@ void Logic::LoadBuffer(protobuf::MessageToClient& message)
} }
else else
{ {
for (auto item : message.butcher_message())
for (const auto& item : message.butcher_message())
{ {
if (item.player_id() == playerID) if (item.player_id() == playerID)
{ {
@@ -285,7 +285,7 @@ void Logic::LoadBuffer(protobuf::MessageToClient& message)
} }
bufferState->butchers.push_back(Proto2THUAI6::Protobuf2THUAI6Butcher(item)); bufferState->butchers.push_back(Proto2THUAI6::Protobuf2THUAI6Butcher(item));
} }
for (auto item : message.human_message())
for (const auto& item : message.human_message())
{ {
int vr = this->bufferState->butcherSelf->viewRange; int vr = this->bufferState->butcherSelf->viewRange;
int deltaX = item.x() - this->bufferState->butcherSelf->x; int deltaX = item.x() - this->bufferState->butcherSelf->x;
@@ -319,7 +319,7 @@ void Logic::LoadBuffer(protobuf::MessageToClient& message)
} }
} }
} }
for (auto item : message.prop_message())
for (const auto& item : message.prop_message())
bufferState->props.push_back(Proto2THUAI6::Protobuf2THUAI6Prop(item)); bufferState->props.push_back(Proto2THUAI6::Protobuf2THUAI6Prop(item));
if (asynchronous) if (asynchronous)
{ {


+ 1
- 1
CAPI/API/src/main.cpp View File

@@ -83,4 +83,4 @@ std::unique_ptr<IAI> CreateAI()
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
return THUAI6Main(argc, argv, CreateAI); return THUAI6Main(argc, argv, CreateAI);
}
}

+ 1
- 1
dependency/proto/Protos.csproj View File

@@ -14,7 +14,7 @@
</ItemGroup>--> </ItemGroup>-->


<ItemGroup> <ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.21.11" />
<PackageReference Include="Google.Protobuf" Version="3.21.12" />
<PackageReference Include="Google.Protobuf.Tools" Version="3.21.12" /> <PackageReference Include="Google.Protobuf.Tools" Version="3.21.12" />
<PackageReference Include="Grpc" Version="2.46.5" /> <PackageReference Include="Grpc" Version="2.46.5" />
<PackageReference Include="Grpc.Core" Version="2.46.5" /> <PackageReference Include="Grpc.Core" Version="2.46.5" />


+ 1
- 1
logic/ClientTest/ClientTest.csproj View File

@@ -8,7 +8,7 @@
</PropertyGroup> </PropertyGroup>


<ItemGroup> <ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.21.11" />
<PackageReference Include="Google.Protobuf" Version="3.21.12" />
<PackageReference Include="Grpc" Version="2.46.5" /> <PackageReference Include="Grpc" Version="2.46.5" />
<PackageReference Include="Grpc.Core" Version="2.46.5" /> <PackageReference Include="Grpc.Core" Version="2.46.5" />
</ItemGroup> </ItemGroup>


+ 1
- 1
logic/Server/Server.csproj View File

@@ -9,7 +9,7 @@


<ItemGroup> <ItemGroup>
<PackageReference Include="FrameRateTask" Version="1.2.0" /> <PackageReference Include="FrameRateTask" Version="1.2.0" />
<PackageReference Include="Google.Protobuf" Version="3.21.11" />
<PackageReference Include="Google.Protobuf" Version="3.21.12" />
<PackageReference Include="Grpc" Version="2.46.5" /> <PackageReference Include="Grpc" Version="2.46.5" />
<PackageReference Include="Grpc.Core" Version="2.46.5" /> <PackageReference Include="Grpc.Core" Version="2.46.5" />
<PackageReference Include="Grpc.Tools" Version="2.51.0"> <PackageReference Include="Grpc.Tools" Version="2.51.0">


Loading…
Cancel
Save