Clear Netgame struct each time player enters a new IP in manual join menu

This commit is contained in:
zico 2013-04-22 11:42:38 +02:00
parent 07a73afee7
commit 664139efcf
2 changed files with 3 additions and 1 deletions

View file

@ -2,7 +2,7 @@ D1X-Rebirth Changelog
20130422
--------
main/net_udp.c: In restricted game mode check for player callsign and sockaddr at the same time
main/net_udp.c: In restricted game mode check for player callsign and sockaddr at the same time; Clear Netgame struct each time player enters a new IP in manual join menu
20130418
--------

View file

@ -596,6 +596,8 @@ static int manual_join_game_handler(newmenu *menu, d_event *event, direct_join *
case EVENT_NEWMENU_SELECTED:
{
int sockres = -1;
net_udp_init(); // yes, redundant call but since the menu does not know any better it would allow any IP entry as long as Netgame-entry looks okay... my head hurts...
if ((atoi(UDP_MyPort)) <= 1024 ||(atoi(UDP_MyPort)) > 65535)
{