Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case ClientMessageType.sensors_data:
- {
- int c = msg.ReadInt32();
- List<Ping> data = new List<Ping>(c);
- for (int i = 0; i < c; i++)
- {
- ulong id = msg.ReadUInt64();
- Point p = new Point(msg.ReadInt32(), msg.ReadInt32());
- Vector2 v = new Vector2(msg.ReadSingle(), msg.ReadSingle());
- Ping ping = new Ping();
- ping.id = id;
- ping.grid = p;
- ping.spot = v;
- if(factionMap.ContainsKey(id))
- {
- ping.faction = factionMap[id];
- }
- if (occupancyMap.ContainsKey(id))
- {
- ping.chatIDs = occupancyMap[id];
- }
- data.Add(ping);
- }
- }
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement