Esempio n. 1
0
 public static void Spawn(Player p, string message)
 {
     short x = (short)(Program.server.world.spawnx << 5);
     short y = (short)(Program.server.world.spawny << 5);
     short z = (short)(Program.server.world.spawnz << 5);
     p.SendSpawn(new short[] { x, y, z }, new byte[] { Program.server.world.srotx, Program.server.world.sroty });
 }
Esempio n. 2
0
        public static void Spawn(Player p, string message)
        {
            short x = (short)(Program.server.world.spawnx << 5);
            short y = (short)(Program.server.world.spawny << 5);
            short z = (short)(Program.server.world.spawnz << 5);

            p.SendSpawn(new short[] { x, y, z }, new byte[] { Program.server.world.srotx, Program.server.world.sroty });
        }
Esempio n. 3
0
        public static void FreezePlayer(Player p, short[] oldPos, byte[] oldRot, short[] newPos, byte[] newRot)
        {
            int dx = newPos[0] - oldPos[0];
            int dy = newPos[1] - oldPos[1];
            int dz = newPos[2] - oldPos[2];

            if ((int)(Math.Sqrt((double)(dx * dx + dz * dz))) > 4)
            {
                p.SendSpawn(oldPos, newRot);
            }
        }
Esempio n. 4
0
        public static void Fetch(Player p, string message)
        {
            if (message.Trim().Equals(""))
            {
                p.SendMessage(0xFF, "No username specified");
                return;
            }

            Player pl = Player.FindPlayer(p, message, true);

            if (pl != null)
            {
                pl.SendSpawn(new short[3] {
                    p.x, p.y, p.z
                }, new byte[2] {
                    0, 0
                });
                pl.SendMessage(0xFF, "Fetched by " + p.GetFormattedName());
                return;
            }
        }