local game connects to 127.0.0.1 instead of localhost (windows returns an ipv6 addres...
authorPerttu Ahola <celeron55@gmail.com>
Tue, 8 Feb 2011 09:24:07 +0000 (11:24 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Tue, 8 Feb 2011 09:24:07 +0000 (11:24 +0200)
minetest.vcproj
src/debug.cpp
src/irrlichtwrapper.cpp
src/main.cpp
src/socket.cpp
src/socket.h

index 34536e0ed8f7d92513390e5f171c3e5c63ff14e8..8d49d2cdf904efd9e5fec917759764f7191567ed 100644 (file)
@@ -39,8 +39,8 @@
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="&quot;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include&quot;;&quot;..\jthread\jthread-1.2.1\src&quot;;&quot;..\irrlicht\irrlicht-1.7.1\include&quot;"\r
-                               PreprocessorDefinitions="WIN32"\r
+                               AdditionalIncludeDirectories="&quot;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include&quot;;&quot;..\jthread\jthread-1.2.1\src&quot;;&quot;..\irrlicht\irrlicht-1.7.1\include&quot;;&quot;..\zlib\zlib-1.2.5&quot;"\r
+                               PreprocessorDefinitions="WIN32;RUN_IN_PLACE"\r
                                BufferSecurityCheck="true"\r
                                EnableEnhancedInstructionSet="1"\r
                                FloatingPointModel="2"\r
@@ -57,7 +57,7 @@
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalLibraryDirectories="&quot;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib&quot;;&quot;..\jthread\jthread-1.2.1\Release&quot;;&quot;..\irrlicht\irrlicht-1.7.1\lib\Win32-visualstudio&quot;"\r
+                               AdditionalLibraryDirectories="&quot;..\irrlicht\irrlicht-1.7.1\lib\Win32-visualstudio&quot;;..\zlib125dll\dll32"\r
                                IgnoreAllDefaultLibraries="false"\r
                                GenerateDebugInformation="true"\r
                        />\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalLibraryDirectories="&quot;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib&quot;;&quot;..\irrlicht\irrlicht-1.7.1\lib\Win32-visualstudio&quot;;..\zlib125dll\dll32"\r
+                               AdditionalLibraryDirectories="&quot;..\irrlicht\irrlicht-1.7.1\lib\Win32-visualstudio&quot;;..\zlib125dll\dll32"\r
                                IgnoreDefaultLibraryNames="libcmtd.dll"\r
                                GenerateDebugInformation="false"\r
                                LinkTimeCodeGeneration="1"\r
index f267790fd3df64881ebdbd39ce9105847e81fd01..ec23235cbd817d88bbd340b00bba661a47dceb29 100644 (file)
@@ -198,6 +198,7 @@ DebugStacker::~DebugStacker()
 
 
 #ifdef _WIN32
+#if CATCH_UNHANDLED_EXCEPTIONS == 1
 void se_trans_func(unsigned int u, EXCEPTION_POINTERS* pExp)
 {
        dstream<<"In trans_func.\n";
@@ -223,6 +224,7 @@ void se_trans_func(unsigned int u, EXCEPTION_POINTERS* pExp)
        }
 }
 #endif
+#endif
 
 
 
index a1d37f4bdc9c353cea38481a6c0c123ec9e43097..4ad647194e0f3413f7252d5b171d6a702a1d2d57 100644 (file)
@@ -169,6 +169,16 @@ video::ITexture* IrrlichtWrapper::getTextureDirect(const TextureSpec &spec)
                        std::string path = porting::getDataPath(name.c_str());
                        dstream<<"getTextureDirect(): Loading path \""<<path
                                        <<"\""<<std::endl;
+                       
+                       // DEBUG
+                       /*{
+                               dstream<<"DEBUG CODE: Loading base image "
+                                               "directly to texture"<<std::endl;
+                               t = driver->getTexture(path.c_str());
+                               driver->renameTexture(t, texture_name.c_str());
+                               return t;
+                       }*/
+                       
                        video::IImage *image = driver->createImageFromFile(path.c_str());
 
                        if(image == NULL)
index e1d8492fdedd226ab6fe19c9a5b2ed540be7d098..74c93a7073d5c072f230d559a0626a6ad72b31f3 100644 (file)
@@ -116,8 +116,6 @@ FIXME: Some network errors on Windows that cause local game to not work
        - See siggjen's emails.\r
           - Is this the famous "windows 7 problem"?\r
        - Apparently there might be other errors too\r
-          - There is some problem with the menu system, something like the\r
-            .Parent of guiPauseMenu to end up being 0xfeeefeee\r
 \r
 Networking and serialization:\r
 -----------------------------\r
@@ -1626,8 +1624,8 @@ int main(int argc, char *argv[])
        video::E_DRIVER_TYPE driverType;\r
 \r
 #ifdef _WIN32\r
-       //driverType = video::EDT_DIRECT3D9;\r
-       driverType = video::EDT_OPENGL;\r
+       driverType = video::EDT_DIRECT3D9;\r
+       //driverType = video::EDT_OPENGL;\r
 #else\r
        driverType = video::EDT_OPENGL;\r
        //driverType = video::EDT_BURNINGSVIDEO; // Best software renderer\r
@@ -1914,7 +1912,8 @@ int main(int argc, char *argv[])
        Address connect_address(0,0,0,0, port);\r
        try{\r
                if(address == "")\r
-                       connect_address.Resolve("localhost");\r
+                       //connect_address.Resolve("localhost");\r
+                       connect_address.setAddress(127,0,0,1);\r
                else\r
                        connect_address.Resolve(address.c_str());\r
        }\r
index 499ee504e0d7e33c3c793577a5f040b2971a8486..b159fa14c5177b92b51bd8a7aca1495c3d98f4d0 100644 (file)
@@ -26,7 +26,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "utility.h"
 
 // Debug printing options
+// Set to 1 for debug output
 #define DP 0
+// This is prepended to everything printed here
 #define DPS ""
 
 bool g_sockets_initialized = false;
@@ -108,6 +110,12 @@ void Address::setAddress(unsigned int address)
        m_address = address;
 }
 
+void Address::setAddress(unsigned int a, unsigned int b,
+               unsigned int c, unsigned int d)
+{
+       m_address = (a<<24) | (b<<16) | ( c<<8) | d;
+}
+
 void Address::setPort(unsigned short port)
 {
        m_port = port;
index b6b58007392dc5a6b40347251d650cfa9070ee6b..a56715d9931131dae0cc1c5b457a9440c074c44f 100644 (file)
@@ -85,6 +85,8 @@ public:
        unsigned int getAddress() const;
        unsigned short getPort() const;
        void setAddress(unsigned int address);
+       void setAddress(unsigned int a, unsigned int b,
+                       unsigned int c, unsigned int d);
        void setPort(unsigned short port);
        void print(std::ostream *s) const;
        void print() const;