예제 #1
0
파일: bg_threads.py 프로젝트: vexyl/PyPoc2
def handle_broadcast_chat(data, players):
    chat_broadcast_packets = helpers.get_and_clear_queue(
        data.chat_broadcast_queue)
    for player in players:
        for packet_info in chat_broadcast_packets:
            if packet_info[1] not in player.ignored_players:
                player.add_packet(packet_info[0])
예제 #2
0
파일: bg_threads.py 프로젝트: vexyl/PyPoc2
def handle_setblocks(data, players):
    setblocks = helpers.get_and_clear_queue(data.setblock_queue)

    for player in players:
        for block_info in setblocks:
            setblock_packet = helpers.gen_relative_setblock_packet(
                player, block_info)
            if setblock_packet is not None:
                player.add_packet(setblock_packet)
    for block_info in setblocks:
        #TODO Handle setting undo info
        pass
예제 #3
0
 def get_all_packets(self):
     return helpers.get_and_clear_queue(self.packet_queue)