Randomly choose singleplayer port
authorPilzAdam <pilzadam@minetest.net>
Fri, 12 Jul 2013 11:26:25 +0000 (13:26 +0200)
committerPilzAdam <pilzadam@minetest.net>
Tue, 16 Jul 2013 00:02:56 +0000 (02:02 +0200)
src/main.cpp

index 580260adea7ffd3c10928d00365a48a1436a6d8a..8ed164d1f2f1b04db3a1537f7e41c7fffb10a7e3 100644 (file)
@@ -1654,7 +1654,7 @@ int main(int argc, char *argv[])
                                        current_playername = "singleplayer";
                                        current_password = "";
                                        current_address = "";
-                                       current_port = 30011;
+                                       current_port = myrand_range(49152, 65535);
                                }
                                else if (address != "")
                                {