mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-23 01:21:57 -05:00
BlockModel shouldn't always use LocalPlayer's modelname, fixes #82.
This commit is contained in:
parent
3d9d2a0e76
commit
8a076102f4
11 changed files with 21 additions and 23 deletions
|
@ -11,7 +11,7 @@ namespace ClassicalSharp {
|
|||
|
||||
/// <summary> Gets the position of the player's eye in the world. </summary>
|
||||
public Vector3 EyePosition {
|
||||
get { return new Vector3( Position.X, Position.Y + Model.EyeY, Position.Z ); }
|
||||
get { return new Vector3( Position.X, Position.Y + Model.GetEyeY( this ), Position.Z ); }
|
||||
}
|
||||
|
||||
protected Game game;
|
||||
|
|
|
@ -14,11 +14,9 @@ namespace ClassicalSharp.Model {
|
|||
get { return blockHeight + 0.075f; }
|
||||
}
|
||||
|
||||
public override float EyeY {
|
||||
get {
|
||||
byte block = Byte.Parse( game.LocalPlayer.ModelName );
|
||||
return block == 0 ? 1 : game.BlockInfo.BlockHeight( block );
|
||||
}
|
||||
public override float GetEyeY( Player player ) {
|
||||
byte block = Byte.Parse( player.ModelName );
|
||||
return block == 0 ? 1 : game.BlockInfo.BlockHeight( block );
|
||||
}
|
||||
|
||||
const float adjust = 0.1f;
|
||||
|
|
|
@ -49,8 +49,8 @@ namespace ClassicalSharp.Model {
|
|||
get { return 1.0125f; }
|
||||
}
|
||||
|
||||
public override float EyeY {
|
||||
get { return 14/16f; }
|
||||
public override float GetEyeY( Player player ) {
|
||||
return 14/16f;
|
||||
}
|
||||
|
||||
public override Vector3 CollisionSize {
|
||||
|
|
|
@ -32,8 +32,8 @@ namespace ClassicalSharp.Model {
|
|||
get { return 1.7f; }
|
||||
}
|
||||
|
||||
public override float EyeY {
|
||||
get { return 22/16f; }
|
||||
public override float GetEyeY( Player player ) {
|
||||
return 22/16f;
|
||||
}
|
||||
|
||||
public override Vector3 CollisionSize {
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace ClassicalSharp.Model {
|
|||
|
||||
public abstract float NameYOffset { get; }
|
||||
|
||||
public abstract float EyeY { get; }
|
||||
public abstract float GetEyeY( Player player );
|
||||
|
||||
public abstract Vector3 CollisionSize { get; }
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@ namespace ClassicalSharp.Model {
|
|||
get { return 1.075f; }
|
||||
}
|
||||
|
||||
public override float EyeY {
|
||||
get { return 12/16f; }
|
||||
public override float GetEyeY( Player player ) {
|
||||
return 12/16f;
|
||||
}
|
||||
|
||||
public override Vector3 CollisionSize {
|
||||
|
|
|
@ -70,8 +70,8 @@ namespace ClassicalSharp.Model {
|
|||
get { return 2.1375f; }
|
||||
}
|
||||
|
||||
public override float EyeY {
|
||||
get { return 26/16f; }
|
||||
public override float GetEyeY( Player player ) {
|
||||
return 26/16f;
|
||||
}
|
||||
|
||||
public override Vector3 CollisionSize {
|
||||
|
|
|
@ -55,8 +55,8 @@ namespace ClassicalSharp.Model {
|
|||
get { return Fur ? 1.48125f: 1.075f; }
|
||||
}
|
||||
|
||||
public override float EyeY {
|
||||
get { return 20/16f; }
|
||||
public override float GetEyeY( Player player ) {
|
||||
return 20/16f;
|
||||
}
|
||||
|
||||
public override Vector3 CollisionSize {
|
||||
|
|
|
@ -43,8 +43,8 @@ namespace ClassicalSharp.Model {
|
|||
get { return 2.075f; }
|
||||
}
|
||||
|
||||
public override float EyeY {
|
||||
get { return 26/16f; }
|
||||
public override float GetEyeY( Player player ) {
|
||||
return 26/16f;
|
||||
}
|
||||
|
||||
public override Vector3 CollisionSize {
|
||||
|
|
|
@ -34,8 +34,8 @@ namespace ClassicalSharp.Model {
|
|||
get { return 1.0125f; }
|
||||
}
|
||||
|
||||
public override float EyeY {
|
||||
get { return 8/16f; }
|
||||
public override float GetEyeY( Player player ) {
|
||||
return 8/16f;
|
||||
}
|
||||
|
||||
public override Vector3 CollisionSize {
|
||||
|
|
|
@ -44,8 +44,8 @@ namespace ClassicalSharp.Model {
|
|||
get { return 2.075f; }
|
||||
}
|
||||
|
||||
public override float EyeY {
|
||||
get { return 26/16f; }
|
||||
public override float GetEyeY( Player player ) {
|
||||
return 26/16f;
|
||||
}
|
||||
|
||||
public override Vector3 CollisionSize {
|
||||
|
|
Loading…
Reference in a new issue