update some format notes
This commit is contained in:
@@ -261,7 +261,7 @@ Some commands only work on the game server and not on the proxy server. The chat
|
|||||||
* `$what` (game server only): Shows the type, name, and stats of the nearest item on the ground.
|
* `$what` (game server only): Shows the type, name, and stats of the nearest item on the ground.
|
||||||
|
|
||||||
* Debugging commands
|
* Debugging commands
|
||||||
* `$debug` (game server only): Enable or disable debugging. When enabled, you'll see purple debug messages from the server when you take certain actions. You'll also be placed into the highest available slot in lobbies and games instead of the lowest, which is useful for finding commands for which newserv doesn't handle client IDs properly.
|
* `$debug` (game server only): Enable or disable debug. You need the DEBUG permission in your user license to use this command. When debug is enabled, you'll see in-game messages from the server when you take certain actions. You'll also be placed into the highest available slot in lobbies and games instead of the lowest, which is useful for finding commands for which newserv doesn't handle client IDs properly. This setting also disables certain safeguards and allows you to do some things that might crash your client.
|
||||||
* `$gc` (game server only): Send your own Guild Card to yourself.
|
* `$gc` (game server only): Send your own Guild Card to yourself.
|
||||||
* `$persist` (game server only): Enable or disable persistence for the current lobby or game. This determines whether the lobby/game is deleted when the last player leaves. You need the DEBUG permission in your user license to use this command because there are no game state checks when you do this. For example, if you make a game persistent, start a quest, then leave the game, the game can't be joined by anyone but also can't be deleted.
|
* `$persist` (game server only): Enable or disable persistence for the current lobby or game. This determines whether the lobby/game is deleted when the last player leaves. You need the DEBUG permission in your user license to use this command because there are no game state checks when you do this. For example, if you make a game persistent, start a quest, then leave the game, the game can't be joined by anyone but also can't be deleted.
|
||||||
* `$sc <data>`: Send a command to yourself.
|
* `$sc <data>`: Send a command to yourself.
|
||||||
|
|||||||
@@ -243,6 +243,7 @@ static void proxy_command_arrow(shared_ptr<ServerState>,
|
|||||||
|
|
||||||
static void server_command_debug(shared_ptr<ServerState>, shared_ptr<Lobby>,
|
static void server_command_debug(shared_ptr<ServerState>, shared_ptr<Lobby>,
|
||||||
shared_ptr<Client> c, const std::u16string&) {
|
shared_ptr<Client> c, const std::u16string&) {
|
||||||
|
check_privileges(c, Privilege::DEBUG);
|
||||||
c->options.debug = !c->options.debug;
|
c->options.debug = !c->options.debug;
|
||||||
send_text_message_printf(c, "Debug %s",
|
send_text_message_printf(c, "Debug %s",
|
||||||
c->options.debug ? "enabled" : "disabled");
|
c->options.debug ? "enabled" : "disabled");
|
||||||
|
|||||||
+11
-8
@@ -495,6 +495,8 @@ struct S_UpdateClientConfig_BB_04 : S_UpdateClientConfig<ClientConfigBB> { } __p
|
|||||||
// 06: Chat
|
// 06: Chat
|
||||||
// Server->client format is same as 01 command. The maximum size of the message
|
// Server->client format is same as 01 command. The maximum size of the message
|
||||||
// is 0x200 bytes.
|
// is 0x200 bytes.
|
||||||
|
// Client->server format is very similar; we include a zero-length array in this
|
||||||
|
// struct to make parsing easier.
|
||||||
// When sent by the client, the text field includes only the message. When sent
|
// When sent by the client, the text field includes only the message. When sent
|
||||||
// by the server, the text field includes the origin player's name, followed by
|
// by the server, the text field includes the origin player's name, followed by
|
||||||
// a tab character, followed by the message.
|
// a tab character, followed by the message.
|
||||||
@@ -504,10 +506,10 @@ struct S_UpdateClientConfig_BB_04 : S_UpdateClientConfig<ClientConfigBB> { } __p
|
|||||||
// set, for example, then the chat message displays as " (whisper)" on player
|
// set, for example, then the chat message displays as " (whisper)" on player
|
||||||
// 0's screen regardless of the message contents. The next bit (2) hides the
|
// 0's screen regardless of the message contents. The next bit (2) hides the
|
||||||
// message from player 1, etc. The high 4 bits of this byte appear not to be
|
// message from player 1, etc. The high 4 bits of this byte appear not to be
|
||||||
// used, but are often nonzero and set to the value 4. We call this byte
|
// used, but are often nonzero and set to the value 4. (This is probably done so
|
||||||
// private_flags in the places where newserv uses it.
|
// that the field is always a valid ASCII character and also never terminates
|
||||||
// Client->server format is very similar; we include a zero-length array in this
|
// the chat string accidentally.) We call this byte private_flags in the places
|
||||||
// struct to make parsing easier.
|
// where newserv uses it.
|
||||||
|
|
||||||
struct C_Chat_06 {
|
struct C_Chat_06 {
|
||||||
parray<le_uint32_t, 2> unused;
|
parray<le_uint32_t, 2> unused;
|
||||||
@@ -3303,14 +3305,15 @@ struct G_SymbolChat_6x07 {
|
|||||||
le_uint32_t client_id;
|
le_uint32_t client_id;
|
||||||
// Bits: SSSCCCFF (S = sound, C = face color, F = face shape)
|
// Bits: SSSCCCFF (S = sound, C = face color, F = face shape)
|
||||||
uint8_t face_spec;
|
uint8_t face_spec;
|
||||||
uint8_t disable_sound; // If low bit is set, no sound is played
|
// Bits: 000000DM (D = capture, M = mute sound)
|
||||||
le_uint16_t unused2;
|
uint8_t flags;
|
||||||
|
le_uint16_t unused;
|
||||||
struct CornerObject {
|
struct CornerObject {
|
||||||
uint8_t type; // FF = no object in this slot
|
uint8_t type; // FF = no object in this slot
|
||||||
// Bits: 000VHCCC (V = reverse vertical, H = reverse horizontal, C = color)
|
// Bits: 000VHCCC (V = reverse vertical, H = reverse horizontal, C = color)
|
||||||
uint8_t flags_color;
|
uint8_t flags_color;
|
||||||
} __packed__;
|
} __packed__;
|
||||||
CornerObject corner_objects[4]; // In reading order (top-left is first)
|
parray<CornerObject, 4> corner_objects; // In reading order; top-left is first
|
||||||
struct FacePart {
|
struct FacePart {
|
||||||
uint8_t type; // FF = no part in this slot
|
uint8_t type; // FF = no part in this slot
|
||||||
uint8_t x;
|
uint8_t x;
|
||||||
@@ -3318,7 +3321,7 @@ struct G_SymbolChat_6x07 {
|
|||||||
// Bits: 000000VH (V = reverse vertical, H = reverse horizontal)
|
// Bits: 000000VH (V = reverse vertical, H = reverse horizontal)
|
||||||
uint8_t flags;
|
uint8_t flags;
|
||||||
} __packed__;
|
} __packed__;
|
||||||
FacePart face_parts[12];
|
parray<FacePart, 12> face_parts;
|
||||||
} __packed__;
|
} __packed__;
|
||||||
|
|
||||||
// 6x08: Invalid subcommand
|
// 6x08: Invalid subcommand
|
||||||
|
|||||||
+5
-3
@@ -1121,11 +1121,14 @@ void send_game_menu_t(
|
|||||||
e.episode = 0x00;
|
e.episode = 0x00;
|
||||||
e.flags = 0x04;
|
e.flags = 0x04;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (shared_ptr<Lobby> l : s->all_lobbies()) {
|
for (shared_ptr<Lobby> l : s->all_lobbies()) {
|
||||||
if (!l->is_game() || (l->version != c->version())) {
|
if (!l->is_game()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (l->version != c->version()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool l_is_ep3 = l->is_ep3();
|
bool l_is_ep3 = l->is_ep3();
|
||||||
bool c_is_ep3 = !!(c->flags & Client::Flag::IS_EPISODE_3);
|
bool c_is_ep3 = !!(c->flags & Client::Flag::IS_EPISODE_3);
|
||||||
if (l_is_ep3 != c_is_ep3) {
|
if (l_is_ep3 != c_is_ep3) {
|
||||||
@@ -1134,7 +1137,6 @@ void send_game_menu_t(
|
|||||||
if ((c->flags & Client::Flag::IS_DC_V1) && (l->flags & Lobby::Flag::NON_V1_ONLY)) {
|
if ((c->flags & Client::Flag::IS_DC_V1) && (l->flags & Lobby::Flag::NON_V1_ONLY)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool l_is_spectator_team = !!(l->flags & Lobby::Flag::IS_SPECTATOR_TEAM);
|
bool l_is_spectator_team = !!(l->flags & Lobby::Flag::IS_SPECTATOR_TEAM);
|
||||||
if (l_is_spectator_team != is_spectator_team_list) {
|
if (l_is_spectator_team != is_spectator_team_list) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user