mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-24 04:50:30 -04:00
Merge branch 'master' of github.com:MightyPirates/OpenComputers into MC1.7
This commit is contained in:
commit
922e88d4c6
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user