protected override void RenderParts(Entity p) { HumanoidModel human = (HumanoidModel)game.ModelCache.Models[0].Instance; vertices = human.vertices; // If user changes option while game is running if (classicArms != game.ClassicArmModel) { classicArms = game.ClassicArmModel; SetTranslationMatrix(); } SkinType skinType = p.SkinType; ModelSet model = skinType == SkinType.Type64x64Slim ? human.SetSlim : (skinType == SkinType.Type64x64 ? human.Set64 : human.Set); game.Graphics.PushMatrix(); game.Graphics.MultiplyMatrix(ref m); Rotate = RotateOrder.YZX; DrawArmPart(model.RightArm); UpdateVB(); if (skinType != SkinType.Type64x32) { index = 0; game.Graphics.AlphaTest = true; DrawArmPart(model.RightArmLayer); UpdateVB(); game.Graphics.AlphaTest = false; } Rotate = RotateOrder.ZYX; game.Graphics.PopMatrix(); }
public void InitCache() { vertices = new VertexPos3fTex2fCol4b[24 * 12]; vb = api.CreateDynamicVb(VertexFormat.Pos3fTex2fCol4b, vertices.Length); cache["humanoid"] = new HumanoidModel(game); cache["human"] = cache["humanoid"]; }
public void InitCache() { vertices = new VertexP3fT2fC4b[24 * 12]; vb = api.CreateDynamicVb( VertexFormat.P3fT2fC4b, vertices.Length ); IModel model = new HumanoidModel( game ); model.CreateParts(); cache["humanoid"] = model; cache["human"] = cache["humanoid"]; }
public void InitCache() { vertices = new VertexP3fT2fC4b[24 * 12]; vb = api.CreateDynamicVb(VertexFormat.P3fT2fC4b, vertices.Length); IModel model = new HumanoidModel(game); model.CreateParts(); cache["humanoid"] = model; cache["human"] = cache["humanoid"]; game.Events.TextureChanged += TextureChanged; }
public override void DrawModel(Entity p) { ApplyTexture(p); HumanoidModel human = (HumanoidModel)game.ModelCache.Models[0].Instance; vertices = human.vertices; ModelPart part = human.Set.Head; part.RotY += 4 / 16f; DrawRotate(-p.HeadXRadians, 0, 0, part, true); part = human.Set.Hat; part.RotY += 4 / 16f; DrawRotate(-p.HeadXRadians, 0, 0, part, true); UpdateVB(); }
protected override void RenderParts(Entity p) { HumanoidModel human = (HumanoidModel)game.ModelCache.Models[0].Instance; vertices = human.vertices; ModelPart part = human.Set.Head; part.RotY += 4 / 16f; DrawRotate(-p.HeadXRadians, 0, 0, part, true); UpdateVB(); game.Graphics.AlphaTest = true; index = 0; part = human.Set.Hat; part.RotY += 4 / 16f; DrawRotate(-p.HeadXRadians, 0, 0, part, true); UpdateVB(); }