diff options
| author | Osmium Sorcerer <os@sof.beauty> | 2026-03-16 15:42:36 +0000 |
|---|---|---|
| committer | Osmium Sorcerer <os@sof.beauty> | 2026-06-06 03:06:43 +0000 |
| commit | 771f69d34ecaa4772b59331f6a8db7b6c5d3df00 (patch) | |
| tree | 5c2d5731c6455ee614f81ca75ab0dc112b33c949 /webAO | |
| parent | a4dd1c43348deacb200e92ff41a1efd9684b345e (diff) | |
Fix offset token substitution in MS packet
In an IC message, x and y offsets are separated by an ampersand, which
is unfortunately a conventional separator within packet fields. So, it
looks like `25&10` for x = 25 and y = 10. A consequence of that is you
have to substitute '&' if you actually want to send it. AO does it by
substituting it to `<and>` and back.
The MS handler instead expected it to never be decoded, and instead
assumed `25<and>10`. By the time the MS packet reaches the handler, the
token has already been decoded into '&', however, thus breaking offsets.
Diffstat (limited to 'webAO')
| -rw-r--r-- | webAO/packets/handlers/handleMS.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/webAO/packets/handlers/handleMS.ts b/webAO/packets/handlers/handleMS.ts index a2f7f33f..746b84d9 100644 --- a/webAO/packets/handlers/handleMS.ts +++ b/webAO/packets/handlers/handleMS.ts @@ -85,8 +85,8 @@ export const handleMS = (args: string[]) => { other_charid: Number(args[17]), other_name: safeTags(args[18]), other_emote: safeTags(args[19]), - self_offset: args[20].split("<and>"), // HACK: here as well, client is fucked and uses this instead of & - other_offset: args[21].split("<and>"), + self_offset: args[20].split("&"), + other_offset: args[21].split("&"), other_flip: Number(args[22]), noninterrupting_preanim: Number(args[23]), }; |
