public void Read(RakNet.BitStream stream, RakNet.Packet packet, Client client) { int vobID = 0; bool spawn = true; String map = ""; Vec3f pos, dir; stream.Read(out vobID); stream.Read(out spawn); stream.Read(out map); 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]; sWorld.getWorld(map).addVob(vob); vob.Spawn(map, pos, dir); }
public void Read(RakNet.BitStream stream, RakNet.Packet packet, Client client) { int plID = 0; String levelName = ""; stream.Read(out plID); stream.Read(out levelName); if (Player.Hero.ID != plID) { Vob pl = sWorld.VobDict[plID]; pl.Despawn(); sWorld.getWorld(levelName).addVob(pl); pl.Spawn(pl.Map, pl.Position, pl.Direction); } else { zString ln = zString.Create(Process.ThisProcess(), levelName); oCGame.Game(Process.ThisProcess()).ChangeLevel(ln, ln); ln.Dispose(); } }