mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-27 08:27:14 +01:00
Show dots above a skater while they are typing a message
This commit is contained in:
16 files changed
+230
-14
No files matched your search
@@ -1266,6 +1266,19 @@ void Host::receive(std::uint64_t peer, std::span<const std::uint8_t> bytes, std:
|
||||
broadcast(p, true, false, p.source);
|
||||
return;
|
||||
}
|
||||
// Grey dots above the sender. Not a chat line, and not logged. A player who may not
|
||||
// chat sends none. "On" is held to a few a second; "off" always goes through.
|
||||
if (p.kind == PacketKind::typing) {
|
||||
if (!routed_source(p, link->member, peer, true, id_) || !may(peer, multiplayer::role_chat)) return;
|
||||
if (p.typing) {
|
||||
if (link->typing_notice && now_ < link->typing_notice + 200000) return;
|
||||
link->typing_notice = now_;
|
||||
}
|
||||
link->last_packet = now_;
|
||||
active(*link);
|
||||
broadcast(p, true, false, p.source);
|
||||
return;
|
||||
}
|
||||
// Linked throwdowns (Extension/Throwdowns/throwdown_relay.cpp): opaque to the
|
||||
// server, relayed like chat to everyone else in the same world.
|
||||
if (p.kind == PacketKind::throwdown) {
|
||||
|
||||
Reference in new issue
Block a user