mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-16 11:06:06 -04:00
Fix sheep model.
This commit is contained in:
parent
5a8ec25957
commit
3f199816f8
@ -15,7 +15,7 @@ namespace ClassicalSharp.Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void InitCache() {
|
public void InitCache() {
|
||||||
vertices = new VertexPos3fTex2fCol4b[384];
|
vertices = new VertexPos3fTex2fCol4b[24 * 12];
|
||||||
vb = api.CreateDynamicVb( VertexFormat.Pos3fTex2fCol4b, vertices.Length );
|
vb = api.CreateDynamicVb( VertexFormat.Pos3fTex2fCol4b, vertices.Length );
|
||||||
cache["humanoid"] = new PlayerModel( game );
|
cache["humanoid"] = new PlayerModel( game );
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@ namespace ClassicalSharp.Model {
|
|||||||
public class SheepModel : IModel {
|
public class SheepModel : IModel {
|
||||||
|
|
||||||
public bool Fur = true;
|
public bool Fur = true;
|
||||||
int furTextureId;
|
|
||||||
|
|
||||||
public SheepModel( Game window ) : base( window ) {
|
public SheepModel( Game window ) : base( window ) {
|
||||||
vertices = new VertexPos3fTex2fCol4b[partVertices * 6 * ( Fur ? 2 : 1 )];
|
vertices = new VertexPos3fTex2fCol4b[partVertices * 6 * ( Fur ? 2 : 1 )];
|
||||||
@ -80,7 +79,11 @@ namespace ClassicalSharp.Model {
|
|||||||
DrawRotate( 0, 0.75f, -0.3125f, p.rightLegXRot, 0, 0, RightLegFront );
|
DrawRotate( 0, 0.75f, -0.3125f, p.rightLegXRot, 0, 0, RightLegFront );
|
||||||
DrawRotate( 0, 0.75f, 0.4375f, p.rightLegXRot, 0, 0, LeftLegBack );
|
DrawRotate( 0, 0.75f, 0.4375f, p.rightLegXRot, 0, 0, LeftLegBack );
|
||||||
DrawRotate( 0, 0.75f, 0.4375f, p.leftLegXRot, 0, 0, RightLegBack );
|
DrawRotate( 0, 0.75f, 0.4375f, p.leftLegXRot, 0, 0, RightLegBack );
|
||||||
|
// Need to draw the two parts separately.
|
||||||
|
graphics.DrawDynamicIndexedVb( DrawMode.Triangles, cache.vb, cache.vertices, index, index * 6 / 4 );
|
||||||
graphics.AlphaTest = true;
|
graphics.AlphaTest = true;
|
||||||
|
index = 0;
|
||||||
|
|
||||||
if( Fur ) {
|
if( Fur ) {
|
||||||
graphics.BindTexture( cache.SheepFurTexId );
|
graphics.BindTexture( cache.SheepFurTexId );
|
||||||
DrawPart( FurTorso );
|
DrawPart( FurTorso );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user