Load animations.png from texture pack if it exists.

This commit is contained in:
UnknownShadow200 2015-09-12 13:56:37 +10:00
parent 41073fc4b9
commit d535448bb4
3 changed files with 5 additions and 3 deletions

View File

@ -10,7 +10,7 @@ namespace ClassicalSharp {
public Vector3 SpawnPoint;
public float ReachDistance = 50f;
public float ReachDistance = 5f;
public byte UserType;
bool canSpeed = true, canFly = true, canRespawn = true, canNoclip = true;
@ -64,7 +64,6 @@ namespace ClassicalSharp {
public override void Tick( double delta ) {
if( game.Map.IsNotLoaded ) return;
//Window.Title = ( GC.GetTotalMemory( false ) / 1024.0 / 1024.0 ).ToString(); // TODO: temp debug statement
float xMoving = 0, zMoving = 0;
lastPos = Position = nextPos;

View File

@ -20,7 +20,7 @@ namespace ClassicalSharp.TexturePack {
//DefineAnimation( 0, 0, 0, 0, 16, 7, 5 );
}
public void SetAnimationAtlas( Bitmap bmp ) {
public void SetAtlas( Bitmap bmp ) {
Dispose();
this.bmp = bmp;
fastBmp = new FastBitmap( bmp, true );

View File

@ -100,6 +100,9 @@ namespace ClassicalSharp.TexturePack {
UpdateTexture( ref cache.SheepFurTexId, stream, false ); break;
case "char.png":
UpdateTexture( ref cache.HumanoidTexId, stream, true ); break;
case "animations.png":
case "animation.png":
game.Animations.SetAtlas( new Bitmap( stream ) ); break;
}
}