mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-23 09:34:35 -05:00
Remove Pack=1 arguments which were causing runtime errors on specific mono versions, partially addresses #93. (Thanks Jjp137)
This commit is contained in:
parent
3865bc6888
commit
2a67f8f698
6 changed files with 6 additions and 6 deletions
|
@ -76,6 +76,7 @@ namespace ClassicalSharp.Map {
|
||||||
if( CheckKey( "EnvMapAppearance", 1, metadata ) ) {
|
if( CheckKey( "EnvMapAppearance", 1, metadata ) ) {
|
||||||
if( curCpeExt.ContainsKey( "TextureURL" ) )
|
if( curCpeExt.ContainsKey( "TextureURL" ) )
|
||||||
map.TextureUrl = (string)curCpeExt["TextureURL"].Value;
|
map.TextureUrl = (string)curCpeExt["TextureURL"].Value;
|
||||||
|
if( map.TextureUrl.Length == 0 ) map.TextureUrl = null;
|
||||||
byte sidesBlock = (byte)curCpeExt["SideBlock"].Value;
|
byte sidesBlock = (byte)curCpeExt["SideBlock"].Value;
|
||||||
byte edgeBlock = (byte)curCpeExt["EdgeBlock"].Value;
|
byte edgeBlock = (byte)curCpeExt["EdgeBlock"].Value;
|
||||||
map.SetSidesBlock( (Block)sidesBlock );
|
map.SetSidesBlock( (Block)sidesBlock );
|
||||||
|
|
|
@ -307,7 +307,6 @@ namespace ClassicalSharp.Model {
|
||||||
vertex.U -= 0.01f / 64f;
|
vertex.U -= 0.01f / 64f;
|
||||||
}
|
}
|
||||||
|
|
||||||
[StructLayout( LayoutKind.Sequential, Pack = 1 )]
|
|
||||||
protected struct ModelVertex {
|
protected struct ModelVertex {
|
||||||
public float X, Y, Z;
|
public float X, Y, Z;
|
||||||
public ushort U, V;
|
public ushort U, V;
|
||||||
|
|
|
@ -219,8 +219,8 @@ namespace ClassicalSharp.Renderers {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NeedsUpdate( int x1, int y1, int z1, int x2, int y2, int z2 ) {
|
bool NeedsUpdate( int x1, int y1, int z1, int x2, int y2, int z2 ) {
|
||||||
byte b1 = game.World.SafeGetBlock( x1, y1, z1 );
|
byte b1 = game.World.GetBlock( x1, y1, z1 );
|
||||||
byte b2 = game.World.SafeGetBlock( x2, y2, z2 );
|
byte b2 = game.World.GetBlock( x2, y2, z2 );
|
||||||
return (!info.IsOpaque[b1] && info.IsOpaque[b2]) || !(info.IsOpaque[b1] && b2 == 0);
|
return (!info.IsOpaque[b1] && info.IsOpaque[b2]) || !(info.IsOpaque[b1] && b2 == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace OpenTK {
|
namespace OpenTK {
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
public struct Vector2 : IEquatable<Vector2>
|
public struct Vector2 : IEquatable<Vector2>
|
||||||
{
|
{
|
||||||
public float X;
|
public float X;
|
||||||
|
|
|
@ -27,7 +27,7 @@ using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace OpenTK {
|
namespace OpenTK {
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
public struct Vector3 : IEquatable<Vector3>
|
public struct Vector3 : IEquatable<Vector3>
|
||||||
{
|
{
|
||||||
public float X;
|
public float X;
|
||||||
|
|
|
@ -27,7 +27,7 @@ using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace OpenTK {
|
namespace OpenTK {
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
public struct Vector4 : IEquatable<Vector4> {
|
public struct Vector4 : IEquatable<Vector4> {
|
||||||
|
|
||||||
public float X;
|
public float X;
|
||||||
|
|
Loading…
Add table
Reference in a new issue