Remove Pack=1 arguments which were causing runtime errors on specific mono versions, partially addresses #93. (Thanks Jjp137)

This commit is contained in:
UnknownShadow200 2016-03-30 15:59:55 +11:00
parent 3865bc6888
commit 2a67f8f698
6 changed files with 6 additions and 6 deletions

View file

@ -76,6 +76,7 @@ namespace ClassicalSharp.Map {
if( CheckKey( "EnvMapAppearance", 1, metadata ) ) {
if( curCpeExt.ContainsKey( "TextureURL" ) )
map.TextureUrl = (string)curCpeExt["TextureURL"].Value;
if( map.TextureUrl.Length == 0 ) map.TextureUrl = null;
byte sidesBlock = (byte)curCpeExt["SideBlock"].Value;
byte edgeBlock = (byte)curCpeExt["EdgeBlock"].Value;
map.SetSidesBlock( (Block)sidesBlock );

View file

@ -307,7 +307,6 @@ namespace ClassicalSharp.Model {
vertex.U -= 0.01f / 64f;
}
[StructLayout( LayoutKind.Sequential, Pack = 1 )]
protected struct ModelVertex {
public float X, Y, Z;
public ushort U, V;

View file

@ -219,8 +219,8 @@ namespace ClassicalSharp.Renderers {
}
bool NeedsUpdate( int x1, int y1, int z1, int x2, int y2, int z2 ) {
byte b1 = game.World.SafeGetBlock( x1, y1, z1 );
byte b2 = game.World.SafeGetBlock( x2, y2, z2 );
byte b1 = game.World.GetBlock( x1, y1, z1 );
byte b2 = game.World.GetBlock( x2, y2, z2 );
return (!info.IsOpaque[b1] && info.IsOpaque[b2]) || !(info.IsOpaque[b1] && b2 == 0);
}

View file

@ -27,7 +27,7 @@ using System.Runtime.InteropServices;
namespace OpenTK {
[StructLayout(LayoutKind.Sequential, Pack = 1)]
[StructLayout(LayoutKind.Sequential)]
public struct Vector2 : IEquatable<Vector2>
{
public float X;

View file

@ -27,7 +27,7 @@ using System.Runtime.InteropServices;
namespace OpenTK {
[StructLayout(LayoutKind.Sequential, Pack = 1)]
[StructLayout(LayoutKind.Sequential)]
public struct Vector3 : IEquatable<Vector3>
{
public float X;

View file

@ -27,7 +27,7 @@ using System.Runtime.InteropServices;
namespace OpenTK {
[StructLayout(LayoutKind.Sequential, Pack = 1)]
[StructLayout(LayoutKind.Sequential)]
public struct Vector4 : IEquatable<Vector4> {
public float X;