Remote dveře se renderují na mapě. Opravena chyba v GlobalMapTile.CoordsToId, která způsobovala desynchronizaci id místností
This commit is contained in:
parent
7e6b3d724b
commit
70b5debb22
7 changed files with 58 additions and 27 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using FNAF_Clone.GUI;
|
||||
|
|
@ -71,11 +72,14 @@ public class Client {
|
|||
}
|
||||
|
||||
private static void OnMapInit(MapInitPacket packet) {
|
||||
(int id1, int id2, ConnectorType type)[] connectors = new (int id1, int id2, ConnectorType type)[packet.Connectors.Length / 3];
|
||||
(int id1, int id2, ConnectorType type)[] connectorsData = new (int id1, int id2, ConnectorType type)[packet.Connectors.Length / 3];
|
||||
for (int i = 0; i < packet.Connectors.Length / 3; i++){
|
||||
connectors[i] = (packet.Connectors[i * 3], packet.Connectors[i * 3 + 1], (ConnectorType)packet.Connectors[i * 3 + 2]);
|
||||
connectorsData[i] = (packet.Connectors[i * 3], packet.Connectors[i * 3 + 1], (ConnectorType)packet.Connectors[i * 3 + 2]);
|
||||
}
|
||||
ClientMapManager.InitMap(connectors);
|
||||
ClientMapManager.InitMap();
|
||||
TileConnectorProjection[] connectors = connectorsData.Select(c => new TileConnectorProjection(ClientMapManager.Get(c.id1), ClientMapManager.Get(c.id2), c.type)).ToArray();
|
||||
ClientMapManager.InitConnectors(connectors);
|
||||
UIManager.SpawnDoors(connectors);
|
||||
}
|
||||
|
||||
public static void Update() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue