Skip to content
Permalink
Browse files

Fix server with old entities format crashing on startup.

  • Loading branch information...
UnknownShadow200 committed Sep 5, 2017
1 parent c616baf commit 63f2198caecdd86bd39705f3b351dfa848b8aab1
Showing with 3 additions and 3 deletions.
  1. +1 −1 fCraft/Network/HttpUtil.cs
  2. +2 −2 fCraft/World/Entity.cs
@@ -64,7 +64,7 @@ public static class HttpUtil {
if (uri.Scheme == "http") {
IPAddress ipv4 = LookupIPv4(uri);
if (ipv4 != null) {
req.Proxy = new WebProxy("http://" + LookupIPv4(uri) + ":" + uri.Port);
req.Proxy = new WebProxy("http://" + ipv4 + ":" + uri.Port);
}
}
return req;
@@ -226,8 +226,8 @@ public sealed class Entity {
if (Path.GetExtension(filename) != ".txt") continue;

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

0 comments on commit 63f2198

Please sign in to comment.
You can’t perform that action at this time.