UserCmd
This message contains the player's polled inputs which was used to process their movement.
- Overview
- C
- C++
- C#
- JS
- TS
- Go
- Rust
- Zig
Name | Type | Size in bytes | Size in bits | Value |
---|---|---|---|---|
Cmd | int | 4 | 32 | - |
Size | int | 4 | 32 | - |
Data | byte[] | Size | Size*8 | UserCmdInfo[] |
typedef struct {
int cmd;
int size;
char* data;
} user_cmd_t;
struct user_cmd_t {
int32_t cmd;
int32_t size;
std::vector<std::byte> data;
};
class UserCmd {
public int Cmd { get; set; }
public int Size { get; set; }
public List<byte> Data { get; set; }
}
class UserCmd {
/** @type {number} */
cmd;
/** @type {number} */
size;
/** @type {number[]} */
data;
}
export class UserCmd {
public cmd?: number;
public size?: number;
public data?: number[];
}
type UserCmd struct {
Cmd int32
Size int32
Data []byte
}
pub struct UserCmd {
pub cmd: i32,
pub size: i32,
pub data: Vec<u8>,
}
const UserCmd = struct {
cmd: i32,
size: i32,
data: []u8,
};