mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 18:15:28 -04:00
Load animations.png from texture pack if it exists.
This commit is contained in:
parent
41073fc4b9
commit
d535448bb4
@ -10,7 +10,7 @@ namespace ClassicalSharp {
|
|||||||
|
|
||||||
public Vector3 SpawnPoint;
|
public Vector3 SpawnPoint;
|
||||||
|
|
||||||
public float ReachDistance = 50f;
|
public float ReachDistance = 5f;
|
||||||
|
|
||||||
public byte UserType;
|
public byte UserType;
|
||||||
bool canSpeed = true, canFly = true, canRespawn = true, canNoclip = true;
|
bool canSpeed = true, canFly = true, canRespawn = true, canNoclip = true;
|
||||||
@ -64,7 +64,6 @@ namespace ClassicalSharp {
|
|||||||
|
|
||||||
public override void Tick( double delta ) {
|
public override void Tick( double delta ) {
|
||||||
if( game.Map.IsNotLoaded ) return;
|
if( game.Map.IsNotLoaded ) return;
|
||||||
//Window.Title = ( GC.GetTotalMemory( false ) / 1024.0 / 1024.0 ).ToString(); // TODO: temp debug statement
|
|
||||||
|
|
||||||
float xMoving = 0, zMoving = 0;
|
float xMoving = 0, zMoving = 0;
|
||||||
lastPos = Position = nextPos;
|
lastPos = Position = nextPos;
|
||||||
|
@ -20,7 +20,7 @@ namespace ClassicalSharp.TexturePack {
|
|||||||
//DefineAnimation( 0, 0, 0, 0, 16, 7, 5 );
|
//DefineAnimation( 0, 0, 0, 0, 16, 7, 5 );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetAnimationAtlas( Bitmap bmp ) {
|
public void SetAtlas( Bitmap bmp ) {
|
||||||
Dispose();
|
Dispose();
|
||||||
this.bmp = bmp;
|
this.bmp = bmp;
|
||||||
fastBmp = new FastBitmap( bmp, true );
|
fastBmp = new FastBitmap( bmp, true );
|
||||||
|
@ -100,6 +100,9 @@ namespace ClassicalSharp.TexturePack {
|
|||||||
UpdateTexture( ref cache.SheepFurTexId, stream, false ); break;
|
UpdateTexture( ref cache.SheepFurTexId, stream, false ); break;
|
||||||
case "char.png":
|
case "char.png":
|
||||||
UpdateTexture( ref cache.HumanoidTexId, stream, true ); break;
|
UpdateTexture( ref cache.HumanoidTexId, stream, true ); break;
|
||||||
|
case "animations.png":
|
||||||
|
case "animation.png":
|
||||||
|
game.Animations.SetAtlas( new Bitmap( stream ) ); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user