MegaGlest / megaglest-source

MegaGlest real-time strategy game engine (cross-platform, 3-d)
http://megaglest.org/
349 stars 89 forks source link

fix: run internet scenario or host game #232

Open pavanvo opened 2 years ago

pavanvo commented 2 years ago

this PR solving problems with creation internet scenario

andy5995 commented 2 years ago

@pavanvo Could you please explain this change more? What is the problem it's fixing?

pavanvo commented 2 years ago

@andy5995 When we starting to host game, we call the code in "getLocalIPAddressListForPlatform" method, which always cause of problem. Basically code getifaddrs(&ifap); not always set ifap value, also we need to check ifa->ifa_addr . It's just standard loop for local network checking, and don't know why it was written incompletely.

Without this checks you can not host game, on the dev branch