// Sends a RPC to everyone at a position except for the given clientID public void SendRPC(RPC RPCToSend, World.Position position, List <string> clientIDsToIgnore) { // Find everyone in the same chunk and let them know foreach (KeyValuePair <string, Core.Player> playerEntry in world.players) { // If this player is at the same position but doesn't have the same name as the sender if (!clientIDsToIgnore.Contains(playerEntry.Key) && playerEntry.Value.controlledGameObject.position == position) { // Send an informational RPC to them letting them know SendRPC(RPCToSend, playerEntry.Key); } } }
public static Packet TeleportPacket(byte id, World.Position pos) { return(TeleportPacket(id, (ushort)pos.X, (ushort)pos.Y, (ushort)pos.Z, pos.RotX, pos.RotY)); }
public static Packet SpawnPacket(byte id, string name, World.Position pos) { return(SpawnPacket(id, name, (ushort)pos.X, (ushort)pos.Y, (ushort)pos.Z, pos.RotX, pos.RotY)); }