rytc / enet-jai

Native Jai port of the ENet Reliable UDP networking library
MIT License
10 stars 2 forks source link

Disconnect event on server doesn't contain peer's data pointer #3

Closed foxik0169 closed 9 months ago

foxik0169 commented 9 months ago

Hello,

I come across an issue when .DISCONNECT (same for _TIMEOUT) event is received, the peer data has already been cleared. Is this desired behaviour? When I look at the demos of zpl enet, I see that they are using data in the .DISCONNECT event.

Thank you for any information.

rytc commented 9 months ago

Thanks for letting me know about this. I pushed this (https://github.com/rytc/enet-jai/commit/e147844a9db949e5d42da13e0f62e42c71818a31) commit to maintain the data pointer. The jai version cleared the whole struct while the zpl version manually clears each member variable.

foxik0169 commented 9 months ago

Looks good, thanks alot!