feat: select paired emote lines from own character

This commit is contained in:
2026-10-15 11:38:28 +09:00
parent 6a3a0ad4b9
commit fc5e475f24
10 changed files with 75 additions and 33 deletions
+2 -2
View File
@@ -68,7 +68,7 @@ export function createMatchController(config: ControllerConfig) {
if (!config.peer) throw new Error('PEER_REQUIRED');
friend = createFriendMatch({ matchId: config.activeMatch.matchId, slot: config.selfIndex, engine, peer: config.peer, clock,
setOffset: value => { offset = value; }, changed: publish, finished: () => { void record(); }, saved,
onEmote: id => { if (emotes.send(config.selfIndex === 0 ? 1 : 0, id, clock.now() + offset)) publish(); } });
onEmote: (id, variant) => { if (emotes.send(config.selfIndex === 0 ? 1 : 0, id, clock.now() + offset, variant)) publish(); } });
await friend.start(); return;
}
if (!saved) engine.start();
@@ -96,7 +96,7 @@ export function createMatchController(config: ControllerConfig) {
const now = clock.now() + offset;
if (config.activeMatch.mode === 'friend' && !config.peer?.connected) return false;
if (!emotes.send(config.selfIndex, id, now)) return false;
if (friend && !friend.sendEmote(id)) return false;
if (friend && !friend.sendEmote(id, emotes.view(now)[config.selfIndex]!.variant)) return false;
publish(); return true;
},
view,