Terraria.NetMessage.sendWater C# (CSharp) Method

sendWater() public static method

public static sendWater ( int x, int y ) : void
x int
y int
return void
        public static void sendWater(int x, int y)
        {
            if (Main.netMode == 1)
            {
                NetMessage.SendData(48, -1, -1, "", x, (float)y, 0.0f, 0.0f, 0, 0, 0);
            }
            else
            {
                for (int remoteClient = 0; remoteClient < 256; ++remoteClient)
                {
                    if ((NetMessage.buffer[remoteClient].broadcast || Netplay.Clients[remoteClient].State >= 3) && Netplay.Clients[remoteClient].Socket.IsConnected())
                    {
                        int index1 = x / 200;
                        int index2 = y / 150;
                        if (Netplay.Clients[remoteClient].TileSections[index1, index2])
                            NetMessage.SendData(48, remoteClient, -1, "", x, (float)y, 0.0f, 0.0f, 0, 0, 0);
                    }
                }
            }
        }