|
| | _parse (self, sequence, data) |
| | _write_move (self, payload, forward) |
| | _oob (self, text, reply) |
| | _fragment_start (self, value=None) |
| | _transmit (self, message) |
| | _process (self, packet) |
| | _voice (self, data) |
| | _decode (self, sequence, data) |
| | _acknowledged (self) |
| | _send (self, server_id, payload) |
| | _write_commands (self, payload, texts) |
| | _keep_moving (self, seconds, forward=True) |
|
| | __init__ (self, port, host='127.0.0.1', timeout=3.0) |
| | close (self) |
| | connect (self, protocol, name, plus=123, extra=None) |
| | receive (self, seconds) |
| | client_num (self) |
| | checksum_feed (self) |
| | commands (self, server_id, texts) |
| | command (self, server_id, text) |
| | resend (self, server_id, first) |
| | download (self, server_id, name, seconds=2.0) |
| | request_gamestate (self, server_id, seconds=5.0) |
| | enter_game (self, server_id, seconds=2.0) |
| | read_frames (self, seconds, forward=True) |
| tuple | addr = (host, port) |
| | sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) |
| | qport = random.randint(1, 0xffff) |
| list | redirects = [] |
| int | protocol = 0 |
| int | challenge = 0 |
| int | outgoing_sequence = 0 |
| int | incoming_sequence = 0 |
| int | command_sequence = 0 |
| str | last_command = '' |
| dict | sent_commands = {0: ''} |
| | state = cod2snap.ServerState() |
| int | parsed = 0 |
| int | parsed_clean = 0 |
| list | parse_errors = [] |
| | fragment_sequence = None |
| | fragment_buffer = bytearray() |
| int | server_time = 1000 |
| int | messages_received = 0 |
| list | voice_packets = [] |
| | server_id = None |
| list | pending_commands = [] |
| | connect_reply = line |
A minimal client that sends its buttons and weapon with every usercmd:
the next of script's (buttons, weapon) pairs, then no buttons and the
weapon of the last one.