<feed xmlns='http://www.w3.org/2005/Atom'>
<title>webao/webAO/dom/areaClick.ts, branch master</title>
<subtitle>WebAO fork</subtitle>
<link rel='alternate' type='text/html' href='https://git.sof.beauty/webao/'/>
<entry>
<title>Separate the MC packet into music and area change</title>
<updated>2026-04-18T16:52:22+00:00</updated>
<author>
<name>Osmium Sorcerer</name>
<email>os@sof.beauty</email>
</author>
<published>2026-03-16T16:33:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sof.beauty/webao/commit/?id=3f1140da7779f568137d62b3f35392edc9e02e1e'/>
<id>3f1140da7779f568137d62b3f35392edc9e02e1e</id>
<content type='text'>
Historically, MC packet ended up in a ridiculous spot. It had this
single structure:

MC#something#cid#%

It used to change music track to `something`, and the character ID `cid`
was used in clientside muting (blindly trusted, by the way). Then,
this packet was expanded to mean area change as well, so the same
generic structure carried two completely different meanings.

How does one differentiate the two? Whether the client tried to move to
an area `something`, or played a music track called `something`?

The solution was to assume that having ".extension" at the end magically
implied that it was a name of a music file, check the string `something`
within the MC packet, and pray that you guessed correctly. So,
understanding the protocol message required penetrating into one of its
data fields and ambiguously inferring what the whole message even meant.

Modern AO gives us a more logical solution. Not as good as having two
separate packets for two unrelated actions, but we can at least discern
the area and music change directly from the framing.

Area change uses the same two-field structure: MC#area#cid#%

Music change, however, has acquired two additional fields:
MC#music#cid#showname#flags#%

We consider four-field MC to be music change, and two-field MC to be
area change, resolving the ambiguity and eliminating odd constraints
on area and music names.

WebAO still uses the old logic and sends two-field MC packets for both
cases. CSDWASASH server, as a result, thinks that web users try to
change areas when they play music. This commit fixes this behavior and
adds special sendAreaChange instead of using sendMusicChange for both.
The flags are hardcoded to 0 because WebAO can't set fade-in, fade-out,
or position sync, and it ignores the server flags.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Historically, MC packet ended up in a ridiculous spot. It had this
single structure:

MC#something#cid#%

It used to change music track to `something`, and the character ID `cid`
was used in clientside muting (blindly trusted, by the way). Then,
this packet was expanded to mean area change as well, so the same
generic structure carried two completely different meanings.

How does one differentiate the two? Whether the client tried to move to
an area `something`, or played a music track called `something`?

The solution was to assume that having ".extension" at the end magically
implied that it was a name of a music file, check the string `something`
within the MC packet, and pray that you guessed correctly. So,
understanding the protocol message required penetrating into one of its
data fields and ambiguously inferring what the whole message even meant.

Modern AO gives us a more logical solution. Not as good as having two
separate packets for two unrelated actions, but we can at least discern
the area and music change directly from the framing.

Area change uses the same two-field structure: MC#area#cid#%

Music change, however, has acquired two additional fields:
MC#music#cid#showname#flags#%

We consider four-field MC to be music change, and two-field MC to be
area change, resolving the ambiguity and eliminating odd constraints
on area and music names.

WebAO still uses the old logic and sends two-field MC packets for both
cases. CSDWASASH server, as a result, thinks that web users try to
change areas when they play music. This commit fixes this behavior and
adds special sendAreaChange instead of using sendMusicChange for both.
The flags are hardcoded to 0 because WebAO can't set fade-in, fade-out,
or position sync, and it ignores the server flags.
</pre>
</div>
</content>
</entry>
<entry>
<title>Filter playerlist by area and remove Area column</title>
<updated>2026-02-10T23:10:05+00:00</updated>
<author>
<name>David Skoland</name>
<email>davidskoland@gmail.com</email>
</author>
<published>2026-02-10T23:10:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sof.beauty/webao/commit/?id=c380112d5f29b68bfa301527405fdf372835900e'/>
<id>c380112d5f29b68bfa301527405fdf372835900e</id>
<content type='text'>
Hide players not in the client's current area. Re-render playerlist
on area switch. Remove the now-redundant Area column.

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Hide players not in the client's current area. Re-render playerlist
on area switch. Remove the now-redundant Area column.

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor playerlist to state-driven rendering with renderPlayerList</title>
<updated>2026-02-10T22:38:17+00:00</updated>
<author>
<name>David Skoland</name>
<email>davidskoland@gmail.com</email>
</author>
<published>2026-02-10T22:38:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sof.beauty/webao/commit/?id=020dfcda00ca06b9a06e7076eaf8a0164ae1327e'/>
<id>020dfcda00ca06b9a06e7076eaf8a0164ae1327e</id>
<content type='text'>
handlePR and handlePU now only update client.playerlist state,
and renderPlayerList handles all DOM rendering from that state.

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
handlePR and handlePU now only update client.playerlist state,
and renderPlayerList handles all DOM rendering from that state.

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Prefetch char.ini for characters present in area via playerlist</title>
<updated>2026-02-07T20:53:59+00:00</updated>
<author>
<name>David Skoland</name>
<email>davidskoland@gmail.com</email>
</author>
<published>2026-02-07T20:53:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sof.beauty/webao/commit/?id=95e4124b0c02b4e5be383c41ed4241566f40e6e6'/>
<id>95e4124b0c02b4e5be383c41ed4241566f40e6e6</id>
<content type='text'>
Store player data (charId, area) in an in-memory Map on the client,
updated by PR/PU packet handlers. Use this to eagerly load char.ini
when a player's character appears in our area or when switching areas,
eliminating the lazy-load delay on first IC message.

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Store player data (charId, area) in an in-memory Map on the client,
updated by PR/PU packet handlers. Use this to eagerly load char.ini
when a player's character appears in our area or when switching areas,
eliminating the lazy-load delay on first IC message.

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Prettified Code!</title>
<updated>2024-11-20T13:31:50+00:00</updated>
<author>
<name>stonedDiscord</name>
<email>stonedDiscord@users.noreply.github.com</email>
</author>
<published>2024-11-20T13:31:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sof.beauty/webao/commit/?id=6684f3fce6e90fd0574d7bab63b629554ab03ef6'/>
<id>6684f3fce6e90fd0574d7bab63b629554ab03ef6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>hide out of area players</title>
<updated>2024-08-31T13:14:48+00:00</updated>
<author>
<name>stonedDiscord</name>
<email>Tukz@gmx.de</email>
</author>
<published>2024-08-31T13:14:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sof.beauty/webao/commit/?id=705bb39fbe20c2b17788b4f2ab859674edc02de6'/>
<id>705bb39fbe20c2b17788b4f2ab859674edc02de6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>I'm so sorry</title>
<updated>2022-09-09T02:20:32+00:00</updated>
<author>
<name>Caleb</name>
<email>caleb.mabry.15@cnu.edu</email>
</author>
<published>2022-09-09T02:20:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sof.beauty/webao/commit/?id=776fe2f4241a67be354908df546f300f413a7d42'/>
<id>776fe2f4241a67be354908df546f300f413a7d42</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Moving some functions</title>
<updated>2022-09-06T01:47:38+00:00</updated>
<author>
<name>Caleb</name>
<email>caleb.mabry.15@cnu.edu</email>
</author>
<published>2022-09-06T01:47:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sof.beauty/webao/commit/?id=34aba3b5b9572b707971d1fda9216ebcf91909ba'/>
<id>34aba3b5b9572b707971d1fda9216ebcf91909ba</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
