Skip to content

Commit 63f2198

Browse files
Fix server with old entities format crashing on startup.
1 parent c616baf commit 63f2198

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

fCraft/Network/HttpUtil.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public static HttpWebRequest CreateRequest([NotNull] Uri uri, TimeSpan timeout)
6464
if (uri.Scheme == "http") {
6565
IPAddress ipv4 = LookupIPv4(uri);
6666
if (ipv4 != null) {
67-
req.Proxy = new WebProxy("http://" + LookupIPv4(uri) + ":" + uri.Port);
67+
req.Proxy = new WebProxy("http://" + ipv4 + ":" + uri.Port);
6868
}
6969
}
7070
return req;

fCraft/World/Entity.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ public static void OldLoad() {
226226
if (Path.GetExtension(filename) != ".txt") continue;
227227

228228
string[] entityData = File.ReadAllLines(filename);
229-
entity.Model = CpeCommands.ParseModel(null, entityData[2]) ?? "humanoid";
230-
entity.World = WorldManager.FindWorldExact(entityData[4]).Name ?? null;
229+
entity.Model = CpeCommands.ParseModel(Player.Console, entityData[2]) ?? "humanoid";
230+
entity.World = entityData[4];
231231
World world = entity.WorldIn();
232232
if (entity.World == null) continue;
233233

0 commit comments

Comments
 (0)