feat: select paired emote lines from own character
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user