public void Read(RakNet.BitStream stream, RakNet.Packet packet, Client client)
        {
            int   vobID = 0;
            Vec3f dir;

            stream.Read(out vobID);
            stream.Read(out dir);

            if (vobID == 0 || !sWorld.VobDict.ContainsKey(vobID))
            {
                throw new Exception("Vob not found!");
            }
            Vob vob = sWorld.VobDict[vobID];

            vob.setDirection(dir);
        }
        public void Read(RakNet.BitStream stream, RakNet.Packet packet, Client client)
        {
            int    plID;
            String levelName;
            Vec3f  pos, dir;

            stream.Read(out plID);
            stream.Read(out levelName);
            stream.Read(out pos);
            stream.Read(out dir);

            if (plID == 0 || !sWorld.VobDict.ContainsKey(plID))
            {
                throw new Exception("Vob not found!");
            }
            Vob vob = sWorld.VobDict[plID];

            if (!(vob is NPCProto))
            {
                throw new Exception("Vob is not an NPC!");
            }

            NPCProto playerVob = (NPCProto)vob;

            Process process = Process.ThisProcess();
            oCNpc   npc     = new oCNpc(process, vob.Address);

            if (vob is Player && vob == Player.Hero)
            {
                ((Player)vob).spawned();
                playerVob.Map = levelName;
                zString level = zString.Create(process, playerVob.Map);
                oCGame.Game(process).ChangeLevel(level, level);
                level.Dispose();


                vob.setDirection(dir);
                vob.setPosition(pos);
                Program._state = new GameState();
            }
        }
        public void Read(RakNet.BitStream stream, RakNet.Packet packet, Client client)
        {
            int vobCount = 0;

            stream.Read(out vobCount);
            for (int i = 0; i < vobCount; i++)
            {
                int   vobID = 0;
                Vec3f pos, dir;

                stream.Read(out vobID);
                stream.Read(out pos);
                stream.Read(out dir);

                if (vobID == 0 || !sWorld.VobDict.ContainsKey(vobID))
                {
                    throw new Exception("Vob not found!");
                }
                Vob vob = sWorld.VobDict[vobID];

                vob.setDirection(dir);
                vob.setPosition(pos);
            }
        }