feedback1 integrate: a form fx handed out late skips a change clip that would already have ended; browser check stalls then lets the clips catch up
This commit is contained in:
1 parent
f26e2014c4
commit
4bab58e508
4 files changed
+34
-16
No files matched your search
@@ -1458,7 +1458,7 @@ export async function createFieldView(host, options = {}) {
|
||||
if (form !== undefined) {
|
||||
const inf = infos.get(e[4].id);
|
||||
if (inf && (form === null || FORMS[inf.spine || inf.defId]?.[form])) inf.form = form;
|
||||
const x = late > 0 && Number(e[4].dur) > 0 ? { ...e[4], dur: Math.max(0, Number(e[4].dur) - late) } : e[4];
|
||||
const x = late > 0 ? { ...e[4], late, ...(Number(e[4].dur) > 0 ? { dur: Math.max(0, Number(e[4].dur) - late) } : {}) } : e[4];
|
||||
views.get(e[4].id)?.setForm?.(form, x);
|
||||
}
|
||||
if (!(late > 0)) fx.simFx(e[1], Number(e[2]), Number(e[3]), e[4]);
|
||||
|
||||
@@ -449,7 +449,10 @@ export class UnitView {
|
||||
const dur = fx && Number(fx.dur);
|
||||
let next = f && f.next ? FORMS[this.info.spine || this.info.defId]?.[f.next]?.roles || null : null;
|
||||
if (next && typeof f.roles.die === 'string') next = { ...next, die: f.roles.die };
|
||||
if (f) this.actor.setForm(f.roles, f.change || null, f.end && dur > 0 ? { clip: f.end, in: dur, roles: next } : null);
|
||||
// an fx handed out late (render/app.js: a stall, a hidden tab) skips a change clip that would already have ended
|
||||
const late = fx && Number(fx.late) > 0 ? Number(fx.late) : 0;
|
||||
const change = f && f.change && !(late > 0 && late >= (this.actor.dur?.(f.change) ?? Infinity)) ? f.change : null;
|
||||
if (f) this.actor.setForm(f.roles, change, f.end && dur > 0 ? { clip: f.end, in: dur, roles: next } : null);
|
||||
else if (had) this.actor.setForm(null);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user