diff options
| author | Osmium Sorcerer <os@sof.beauty> | 2026-03-22 17:30:03 +0000 |
|---|---|---|
| committer | Osmium Sorcerer <os@sof.beauty> | 2026-03-29 22:22:25 +0000 |
| commit | 3b8bc386d316b6e177c814920f21f5ab5d798ee6 (patch) | |
| tree | a19d60b323d8211a4d71594c2616ecbe78f2cef5 /src/courtroom.cpp | |
| parent | 39372432b78b3d0980b004903739539e565c0948 (diff) | |
Support passworded characters in character list
This obscure feature has been present for years, from sending passwords
to the server to showing `char_passworded` image over character icons.
Servers could already exploit clients sending `PW` with a password every
time they select a character to implement passworded characters. The
clients had no way of knowing which ones were passworded, however, and
couldn't filter them despite "Passworded" checkbox being here all along.
The approach used by this commit is a hack. During loading, server sends
SC which is a list of characters, each one having name, description, and
evidence. In practice, only names were used. Descriptions were stored in
memory but unused, and evidence was ignored altogether. By adding a
magic value "P" in this "character evidence" field, server can mark
passworded characters without breaking Vanilla compatibility.
Diffstat (limited to 'src/courtroom.cpp')
| -rw-r--r-- | src/courtroom.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 0edef94..82caddd 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -1357,6 +1357,7 @@ void Courtroom::set_taken(int n_char, bool p_taken) CharacterSlot f_char; f_char.name = char_list.at(n_char).name; f_char.description = char_list.at(n_char).description; + f_char.passworded = char_list.at(n_char).passworded; f_char.taken = p_taken; f_char.evidence_string = char_list.at(n_char).evidence_string; |
