Merge branch 'master' of github.com:MightyPirates/OpenComputers into MC1.7

This commit is contained in:
Florian Nücke 2014-06-29 20:57:13 +02:00
commit 922e88d4c6
2 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ trait Hub extends traits.Environment with SidedEnvironment {
}
protected def tryEnqueuePacket(sourceSide: ForgeDirection, packet: Packet) = queue.synchronized {
if (packet.ttl > 0 && queue.size < maxQueueSize) {
if (packet.ttl > 0 && queue.size < maxQueueSize && !plugs.exists(_.node.address == packet.source)) {
queue += sourceSide -> packet.hop()
if (relayCooldown < 0) {
relayCooldown = relayDelay

View File

@ -166,7 +166,7 @@ object PackedColor {
private val bgMask = 0x000000FF
def pack(foreground: Color, background: Color, format: ColorFormat) = {
((format.deflate(foreground) << fgShift) | format.deflate(background)).toShort
(((format.deflate(foreground) & 0xFF) << fgShift) | (format.deflate(background) & 0xFF)).toShort
}
def extractForeground(color: Short) = (color & 0xFFFF) >>> fgShift