mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 10:05:44 -04:00
Fix a bug I introduced by only negating, rather than negating the negation.
This commit is contained in:
parent
9e15c3775b
commit
611f26c4a9
@ -10,7 +10,6 @@ namespace ClassicalSharp {
|
|||||||
public ChatScreen( Game game ) : base( game ) {
|
public ChatScreen( Game game ) : base( game ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int ChatInputYOffset, ChatLogYOffset;
|
|
||||||
const int chatLines = 12;
|
const int chatLines = 12;
|
||||||
Texture announcementTex;
|
Texture announcementTex;
|
||||||
TextInputWidget textInput;
|
TextInputWidget textInput;
|
||||||
@ -67,9 +66,10 @@ namespace ClassicalSharp {
|
|||||||
chatFont = new Font( "Arial", game.Chat.FontSize );
|
chatFont = new Font( "Arial", game.Chat.FontSize );
|
||||||
chatInputFont = new Font( "Arial", game.Chat.FontSize, FontStyle.Bold );
|
chatInputFont = new Font( "Arial", game.Chat.FontSize, FontStyle.Bold );
|
||||||
announcementFont = new Font( "Arial", 14 );
|
announcementFont = new Font( "Arial", 14 );
|
||||||
|
const int blockSize = 40;
|
||||||
|
|
||||||
textInput = new TextInputWidget( game, chatFont, chatInputFont );
|
textInput = new TextInputWidget( game, chatFont, chatInputFont );
|
||||||
textInput.YOffset = ChatInputYOffset;
|
textInput.YOffset = blockSize * 2 + blockSize / 2;
|
||||||
status = new TextGroupWidget( game, 3, chatFont );
|
status = new TextGroupWidget( game, 3, chatFont );
|
||||||
status.VerticalAnchor = Anchor.LeftOrTop;
|
status.VerticalAnchor = Anchor.LeftOrTop;
|
||||||
status.HorizontalAnchor = Anchor.BottomOrRight;
|
status.HorizontalAnchor = Anchor.BottomOrRight;
|
||||||
@ -77,11 +77,11 @@ namespace ClassicalSharp {
|
|||||||
bottomRight = new TextGroupWidget( game, 3, chatFont );
|
bottomRight = new TextGroupWidget( game, 3, chatFont );
|
||||||
bottomRight.VerticalAnchor = Anchor.BottomOrRight;
|
bottomRight.VerticalAnchor = Anchor.BottomOrRight;
|
||||||
bottomRight.HorizontalAnchor = Anchor.BottomOrRight;
|
bottomRight.HorizontalAnchor = Anchor.BottomOrRight;
|
||||||
bottomRight.YOffset = ChatInputYOffset;
|
bottomRight.YOffset = blockSize + blockSize / 2;
|
||||||
bottomRight.Init();
|
bottomRight.Init();
|
||||||
normalChat = new TextGroupWidget( game, chatLines, chatFont );
|
normalChat = new TextGroupWidget( game, chatLines, chatFont );
|
||||||
normalChat.XOffset = 10;
|
normalChat.XOffset = 10;
|
||||||
normalChat.YOffset = ChatLogYOffset;
|
normalChat.YOffset = blockSize * 3;
|
||||||
normalChat.HorizontalAnchor = Anchor.LeftOrTop;
|
normalChat.HorizontalAnchor = Anchor.LeftOrTop;
|
||||||
normalChat.VerticalAnchor = Anchor.BottomOrRight;
|
normalChat.VerticalAnchor = Anchor.BottomOrRight;
|
||||||
normalChat.Init();
|
normalChat.Init();
|
||||||
|
@ -76,9 +76,6 @@ namespace ClassicalSharp {
|
|||||||
public override void Init() {
|
public override void Init() {
|
||||||
playerFont = new Font( "Arial", 12 );
|
playerFont = new Font( "Arial", 12 );
|
||||||
chat = new ChatScreen( game );
|
chat = new ChatScreen( game );
|
||||||
const int blockSize = 40;
|
|
||||||
chat.ChatLogYOffset = blockSize + blockSize;
|
|
||||||
chat.ChatInputYOffset = blockSize + blockSize / 2;
|
|
||||||
chat.Init();
|
chat.Init();
|
||||||
hotbar = new BlockHotbarWidget( game );
|
hotbar = new BlockHotbarWidget( game );
|
||||||
hotbar.Init();
|
hotbar.Init();
|
||||||
|
@ -126,7 +126,7 @@ namespace ClassicalSharp {
|
|||||||
BoundingBox bounds = CollisionBounds;
|
BoundingBox bounds = CollisionBounds;
|
||||||
bounds.Min.Y += 1;
|
bounds.Min.Y += 1;
|
||||||
|
|
||||||
bool isSolid = !TouchesAny( bounds,
|
bool isSolid = TouchesAny( bounds,
|
||||||
b => info.CollideType[b] != BlockCollideType.WalkThrough || b == (byte)Block.Rope );
|
b => info.CollideType[b] != BlockCollideType.WalkThrough || b == (byte)Block.Rope );
|
||||||
bool pastJumpPoint = Position.Y % 1 >= 0.4;
|
bool pastJumpPoint = Position.Y % 1 >= 0.4;
|
||||||
if( isSolid || !pastJumpPoint )
|
if( isSolid || !pastJumpPoint )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user