|
OpenCoD2-Plus
Call of Duty 2 client & server, rebuilt
|
Public Attributes | |
| int | presses = getattr(self, 'presses', 0) + 1 |
| Public Attributes inherited from cod2client.Client | |
| 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 | |
Static Public Attributes | |
| int | weapon = 0 |
| bool | firing = False |
| bool | attack = False |
| float | pitch = 0.0 |
| bool | walking = False |
| bool | melee = False |
| int | frag_commands = 0 |
Protected Member Functions | |
| _parse (self, sequence, data) | |
| _write_move (self, payload, forward) | |
| Protected Member Functions inherited from cod2client.Client | |
| _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) | |
Additional Inherited Members | |
| Public Member Functions inherited from cod2client.Client | |
| __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) | |
A minimal client that sends the full usercmd, the one with the weapon and the pitch; it stands still unless walking (forward), and while firing it presses the attack button on every other command, or the melee one for 6 commands out of 12; the frag grenade button it holds for frag_commands.
|
protected |
Decodes and parses one server message; see cod2snap.ServerState.parse.
Reimplemented from cod2client.Client.
|
protected |
One usercmd as MSG_ReadDeltaUsercmdKey reads it against the default command: absolute server time, then changed fields XORed with the key.
Reimplemented from cod2client.Client.
|
static |
|
static |
|
static |
|
static |
|
static |
| int hit_location_test.Shooter.presses = getattr(self, 'presses', 0) + 1 |
|
static |
|
static |