Fix a bug I introduced by only negating, rather than negating the negation.

This commit is contained in:
UnknownShadow200 2015-10-22 20:44:03 +11:00
parent 9e15c3775b
commit 611f26c4a9
3 changed files with 5 additions and 8 deletions

View File

@ -10,7 +10,6 @@ namespace ClassicalSharp {
public ChatScreen( Game game ) : base( game ) {
}
public int ChatInputYOffset, ChatLogYOffset;
const int chatLines = 12;
Texture announcementTex;
TextInputWidget textInput;
@ -67,9 +66,10 @@ namespace ClassicalSharp {
chatFont = new Font( "Arial", game.Chat.FontSize );
chatInputFont = new Font( "Arial", game.Chat.FontSize, FontStyle.Bold );
announcementFont = new Font( "Arial", 14 );
const int blockSize = 40;
textInput = new TextInputWidget( game, chatFont, chatInputFont );
textInput.YOffset = ChatInputYOffset;
textInput.YOffset = blockSize * 2 + blockSize / 2;
status = new TextGroupWidget( game, 3, chatFont );
status.VerticalAnchor = Anchor.LeftOrTop;
status.HorizontalAnchor = Anchor.BottomOrRight;
@ -77,11 +77,11 @@ namespace ClassicalSharp {
bottomRight = new TextGroupWidget( game, 3, chatFont );
bottomRight.VerticalAnchor = Anchor.BottomOrRight;
bottomRight.HorizontalAnchor = Anchor.BottomOrRight;
bottomRight.YOffset = ChatInputYOffset;
bottomRight.YOffset = blockSize + blockSize / 2;
bottomRight.Init();
normalChat = new TextGroupWidget( game, chatLines, chatFont );
normalChat.XOffset = 10;
normalChat.YOffset = ChatLogYOffset;
normalChat.YOffset = blockSize * 3;
normalChat.HorizontalAnchor = Anchor.LeftOrTop;
normalChat.VerticalAnchor = Anchor.BottomOrRight;
normalChat.Init();

View File

@ -76,9 +76,6 @@ namespace ClassicalSharp {
public override void Init() {
playerFont = new Font( "Arial", 12 );
chat = new ChatScreen( game );
const int blockSize = 40;
chat.ChatLogYOffset = blockSize + blockSize;
chat.ChatInputYOffset = blockSize + blockSize / 2;
chat.Init();
hotbar = new BlockHotbarWidget( game );
hotbar.Init();

View File

@ -126,7 +126,7 @@ namespace ClassicalSharp {
BoundingBox bounds = CollisionBounds;
bounds.Min.Y += 1;
bool isSolid = !TouchesAny( bounds,
bool isSolid = TouchesAny( bounds,
b => info.CollideType[b] != BlockCollideType.WalkThrough || b == (byte)Block.Rope );
bool pastJumpPoint = Position.Y % 1 >= 0.4;
if( isSolid || !pastJumpPoint )