Letzte Bugfixes. Wegfindung funktioniert wieder

This commit is contained in:
2014-05-15 21:43:14 +02:00
parent ec6d0d6af0
commit 128adc7282
3 changed files with 22 additions and 22 deletions

View File

@@ -33,8 +33,8 @@ namespace WorldOfPeacecraft
Parse = new Parser (this, receiverBuffer);
Rec = new Receiver (Client, receiverBuffer);
Send = new Sender (Client, SenderBuffer);
SenderBuffer.AddLine ("get:me");
SenderBuffer.AddLine ("get:ents");
SenderBuffer.AddLine ("get:me");
SenderBuffer.AddLine ("get:map");
}
@@ -76,7 +76,11 @@ namespace WorldOfPeacecraft
public Player getPlayer (int playerId)
{
return Players[playerId];
try {
return Players [playerId];
} catch (KeyNotFoundException e) {
return null;
}
}
public Dictionary<int, Player> getPlayerList()
@@ -167,6 +171,7 @@ namespace WorldOfPeacecraft
Pathwalker.Stop();
LinkedList<Coordinate> path = Pathfinder.FindPath (Players [SelfId].Coord, new Coordinate (x, y), Map);
Pathwalker.SetCoords (path);
MoveStep();
}
public void MoveStep ()