ashoulson / RailgunNet

A Client/Server Network State-Synchronization Layer for Games
Other
154 stars 21 forks source link

Overflow handling for reliable event Ids #9

Closed ashoulson closed 8 years ago

ashoulson commented 8 years ago

foreach event in packet.events: if event.id == this.nextExpectedId: this.Process(event) this.nextExpectedId++

The ++ can wrap and it won't matter