mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-29 01:35:42 +00:00
Use flatbuffer-sized production knowledge indices (#7616)
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "RaiseDeadCommand.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include "src/main/cpp/net/eagle0/shardok/library/actions/ActionRequiresHeroException.hpp"
|
||||
#include "src/main/cpp/net/eagle0/shardok/library/unit/Unit.hpp"
|
||||
#include "src/main/cpp/net/eagle0/shardok/library/util/ActionResultFlatbufferHelpers.hpp"
|
||||
@@ -107,7 +109,7 @@ auto GetNewUnit(
|
||||
unit.mutate_player_id(playerId);
|
||||
unit.mutate_commanding_unit_id(commandingUnitId);
|
||||
|
||||
for (int i = 0; i < unit.opponent_knowledge()->size(); i++) {
|
||||
for (uint32_t i = 0; i < unit.opponent_knowledge()->size(); i++) {
|
||||
unit.mutable_opponent_knowledge()->Mutate(i, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "src/main/cpp/net/eagle0/shardok/library/view_filters/GameStateGuesser.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
@@ -481,7 +482,7 @@ auto GuessedUnit(
|
||||
|
||||
unit.mutate_has_moved_in_zoc(uv.has_moved_in_zoc());
|
||||
|
||||
for (int i = 0; i < unit.opponent_knowledge()->size(); i++) {
|
||||
for (uint32_t i = 0; i < unit.opponent_knowledge()->size(); i++) {
|
||||
unit.mutable_opponent_knowledge()->Mutate(i, 0);
|
||||
}
|
||||
unit.mutable_opponent_knowledge()->Mutate(toPid, uv.my_knowledge());
|
||||
@@ -693,4 +694,4 @@ auto KnownUnitStats(const GameStateView &gameStateView)
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace shardok
|
||||
} // namespace shardok
|
||||
|
||||
Reference in New Issue
Block a user