rework chunk picker update logic and participation logic

disable most spammy log
This commit is contained in:
2024-07-08 18:12:47 +02:00
parent 79e3070422
commit e5681b4ad5
7 changed files with 269 additions and 43 deletions

View File

@@ -19,6 +19,13 @@
// goal is to always keep 2 transfers running and X(6) requests queued up
// per peer
struct ChunkPickerUpdateTag {};
struct ChunkPickerTimer {
// adds update tag on 0
float timer {0.f};
};
// contact component?
struct ChunkPicker {
// max transfers
@@ -41,13 +48,20 @@ struct ChunkPicker {
};
// TODO: only unfinished?
entt::dense_map<Object, ParticipationEntry> participating_unfinished;
entt::dense_set<Object> participating;
Object participating_in_last {entt::null};
private:
// updates participating_unfinished
void updateParticipation(
Contact3Handle c,
ObjectRegistry& objreg
);
public:
void validateParticipation(
Contact3Handle c,
ObjectRegistry& objreg
);
// tick
//void sendInfoRequests();