diff --git a/ClassicalSharp/Blocks/BlockInfo.BoundingBox.cs b/ClassicalSharp/Blocks/BlockInfo.BoundingBox.cs
index 3de7c0f65..889a5a69e 100644
--- a/ClassicalSharp/Blocks/BlockInfo.BoundingBox.cs
+++ b/ClassicalSharp/Blocks/BlockInfo.BoundingBox.cs
@@ -42,12 +42,13 @@ namespace ClassicalSharp {
+ new Vector3( 0.5f, 0, 0.5f );
}
- const int alphaTest = unchecked( (int)0x80000000 );
+ const int alphaTest = unchecked( (int)0xFF000000 );
unsafe float GetSpriteBB_TopY( int size, int tileX, int tileY, FastBitmap fastBmp ) {
for( int y = 0; y < size; y++ ) {
int* row = fastBmp.GetRowPtr( tileY * size + y ) + (tileX * size);
for( int x = 0; x < size; x++ ) {
- if( (row[x] & alphaTest) != 0 )
+ byte alpha = (byte)((row[x] & alphaTest) >> 24);
+ if( alpha != 0 )
return 1 - (float)y / size;
}
}
@@ -58,7 +59,8 @@ namespace ClassicalSharp {
for( int y = size - 1; y >= 0; y-- ) {
int* row = fastBmp.GetRowPtr( tileY * size + y ) + (tileX * size);
for( int x = 0; x < size; x++ ) {
- if( (row[x] & alphaTest) != 0 )
+ byte alpha = (byte)((row[x] & alphaTest) >> 24);
+ if( alpha != 0 )
return 1 - (float)(y + 1) / size;
}
}
@@ -69,7 +71,8 @@ namespace ClassicalSharp {
for( int x = 0; x < size; x++ ) {
for( int y = 0; y < size; y++ ) {
int* row = fastBmp.GetRowPtr( tileY * size + y ) + (tileX * size);
- if( (row[x] & alphaTest) != 0 )
+ byte alpha = (byte)((row[x] & alphaTest) >> 24);
+ if( alpha != 0 )
return (float)x / size;
}
}
@@ -80,7 +83,8 @@ namespace ClassicalSharp {
for( int x = size - 1; x >= 0; x-- ) {
for( int y = 0; y < size; y++ ) {
int* row = fastBmp.GetRowPtr( tileY * size + y ) + (tileX * size);
- if( (row[x] & alphaTest) != 0 )
+ byte alpha = (byte)((row[x] & alphaTest) >> 24);
+ if( alpha != 0 )
return (float)(x + 1) / size;
}
}
diff --git a/ClassicalSharp/Network/NetworkProcessor.CPE.cs b/ClassicalSharp/Network/NetworkProcessor.CPE.cs
index ee24631e3..a65ad1ad5 100644
--- a/ClassicalSharp/Network/NetworkProcessor.CPE.cs
+++ b/ClassicalSharp/Network/NetworkProcessor.CPE.cs
@@ -174,7 +174,11 @@ namespace ClassicalSharp {
game.CpePlayersList[nameId] = info;
if( oldInfo != null ) {
- game.Events.RaiseCpeListInfoChanged( (byte)nameId );
+ // Only redraw the CPE player list info if something changed.
+ if( info.PlayerName != oldInfo.PlayerName || info.ListName != oldInfo.ListName ||
+ info.GroupName != oldInfo.GroupName || info.GroupRank != oldInfo.GroupRank ) {
+ game.Events.RaiseCpeListInfoChanged( (byte)nameId );
+ }
} else {
game.Events.RaiseCpeListInfoAdded( (byte)nameId );
}
diff --git a/Launcher2/Launcher2.csproj b/Launcher2/Launcher2.csproj
index 7349b7fde..ccb09b833 100644
--- a/Launcher2/Launcher2.csproj
+++ b/Launcher2/Launcher2.csproj
@@ -4,7 +4,7 @@
{3E84ACC1-27B4-401B-A359-6AAE4DF6C9B5}
Debug
AnyCPU
- Exe
+ WinExe
Launcher2
Launcher2
v2.0