higher tickrate if open requests
(we expect an init soon and dont want to bounce around)
This commit is contained in:
parent
b64a4ae31c
commit
b068819069
@ -216,7 +216,7 @@ SHA1_NGCFT1::SHA1_NGCFT1(
|
||||
_neep.subscribe(this, NGCEXT_Event::FT1_BITSET);
|
||||
}
|
||||
|
||||
void SHA1_NGCFT1::iterate(float delta) {
|
||||
float SHA1_NGCFT1::iterate(float delta) {
|
||||
std::cerr << "---------- new tick ----------\n";
|
||||
// info builder queue
|
||||
if (_info_builder_dirty) {
|
||||
@ -438,6 +438,14 @@ void SHA1_NGCFT1::iterate(float delta) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (_peer_open_requests.empty()) {
|
||||
return 2.f;
|
||||
} else {
|
||||
// pretty conservative and should be ajusted on a per peer, per delay basis
|
||||
// seems to do the trick
|
||||
return 0.05f;
|
||||
}
|
||||
}
|
||||
|
||||
bool SHA1_NGCFT1::onEvent(const Message::Events::MessageUpdated& e) {
|
||||
|
@ -101,7 +101,7 @@ class SHA1_NGCFT1 : public ToxEventI, public RegistryMessageModelEventI, public
|
||||
NGCEXTEventProvider& neep
|
||||
);
|
||||
|
||||
void iterate(float delta);
|
||||
float iterate(float delta);
|
||||
|
||||
protected: // rmm events (actions)
|
||||
bool onEvent(const Message::Events::MessageUpdated&) override;
|
||||
|
Loading…
Reference in New Issue
Block a user