Fix for T2

see: http://dev.vba-m.com/T2

> Every time I launch a server it defaults to the locahost IP instead of my
> actual IP. This is preventing me from linking with friends over Hamachi. When
> they enter my IP it errors on their end and they cannot connect. [report taken
> from <https://sourceforge.net/p/vbam/bugs/219/>]

Also, by chance, added the build folder to `.gitignore` so as to not pollute the
git repo.  I meant to do them as separate commits, but I forgot to do so.

Signed-off-by: Jonathan Sifuentes <jayands2k11@ymail.com>
This commit is contained in:
Jonathan Sifuentes 2016-08-08 19:23:08 -07:00
parent 4c4f76bd4a
commit e4354eedd2
3 changed files with 4 additions and 2 deletions

2
.gitignore vendored
View File

@ -4,3 +4,5 @@ src/wx/cmd-evtable.h
src/wx/cmdhandlers.h src/wx/cmdhandlers.h
src/wx/cmdtab.cpp src/wx/cmdtab.cpp
src/wx/wxvbam.xrs src/wx/wxvbam.xrs
build/

View File

@ -7,7 +7,7 @@
GBASockClient::GBASockClient(sf::IpAddress _server_addr) GBASockClient::GBASockClient(sf::IpAddress _server_addr)
{ {
if (_server_addr == sf::IpAddress::None) if (_server_addr == sf::IpAddress::None)
server_addr = sf::IpAddress::LocalHost; server_addr = sf::IpAddress::getPublicAddress();
else else
server_addr = _server_addr; server_addr = _server_addr;

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include <cstdlib> #include <cstdint>
#include <SFML/Network.hpp> #include <SFML/Network.hpp>
class GBASockClient { class GBASockClient {