Skip to content

Instantly share code, notes, and snippets.

@Zi0MIX
Created November 29, 2024 17:13
Show Gist options
  • Select an option

  • Save Zi0MIX/2b9fb6c049111c72d3f9945a45b4c2b1 to your computer and use it in GitHub Desktop.

Select an option

Save Zi0MIX/2b9fb6c049111c72d3f9945a45b4c2b1 to your computer and use it in GitHub Desktop.
Network Frame Fix
main()
{
replaceFunc(maps\mp\animscripts\zm_utility::wait_network_frame, ::fixed_wait_network_frame);
replaceFunc(maps\mp\zombies\_zm_utility::wait_network_frame, ::fixed_wait_network_frame);
}
fixed_wait_network_frame()
{
if (level.players.size == 1)
{
wait 0.1;
}
else if (numremoteclients())
{
snapshot_ids = getsnapshotindexarray();
for (acked = undefined; !isdefined(acked); acked = snapshotacknowledged(snapshot_ids))
level waittill("snapacknowledged");
}
else
{
wait 0.1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment