Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix server with old entities format crashing on startup.
  • Loading branch information
UnknownShadow200 committed Sep 5, 2017
1 parent c616baf commit 63f2198
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fCraft/Network/HttpUtil.cs
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions fCraft/World/Entity.cs
Expand Up @@ -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;

Expand Down

0 comments on commit 63f2198

Please sign in to comment.