public Entity(HypercubeMap map, string name, Vector3S location, byte rot, byte look) { Name = name; Location = location; Rot = rot; Look = look; Map = map; Model = "default"; Visible = true; Id = ServerCore.FreeEids.Pop(); BuildMaterial = ServerCore.Blockholder.GetBlock(""); Lastmaterial = ServerCore.Blockholder.GetBlock(1); ClientState = new BuildState(); BuildMode = new BmStruct {Name = ""}; ClientId = (byte)Map.FreeIds.Pop(); }
public void SetBuildmode(string mode) { BuildMode = ServerCore.BmContainer.Modes.ContainsKey(mode) ? ServerCore.BmContainer.Modes[mode] : new BmStruct {Name = ""}; ClientState.ResendBlocks(MyClient); ClientState = new BuildState(); }