mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 05:25:14 +00:00
Only send debug sync packet if no lag is detected
This commit is contained in:
parent
6e46bc316e
commit
8f274afd49
1 changed files with 7 additions and 1 deletions
|
@ -21,7 +21,13 @@ void print_sync_object_table(void) {
|
|||
}
|
||||
|
||||
void network_send_debug_sync(void) {
|
||||
return;
|
||||
// check for lag
|
||||
for (int i = 0; i < MAX_PLAYERS; i++) {
|
||||
struct NetworkPlayer* np = &gNetworkPlayers[i];
|
||||
if (!np->connected) { continue; }
|
||||
if (np->ping > 250) { return; }
|
||||
}
|
||||
|
||||
for (struct SyncObject* so = sync_object_get_first(); so != NULL; so = sync_object_get_next()) {
|
||||
if (!so || !so->o) { continue; }
|
||||
u32 behaviorId = get_id_from_behavior((so->behavior == NULL) ? so->behavior : so->o->behavior);
|
||||
|
|
Loading…
Reference in a new issue