Jester and coilhead sounds
This commit is contained in:
+7
-6
@@ -163,12 +163,10 @@ export class Sounds {
|
||||
|
||||
const at = options.follow !== undefined ? this.#entity_position(options.follow) : options.at;
|
||||
const playing = new Playing(json, file, { ...options }, this.clock(), at && { ...at });
|
||||
// an entity this client doesn't have can't be followed
|
||||
if (options.follow !== undefined && !at) {
|
||||
playing.done = true;
|
||||
return playing;
|
||||
}
|
||||
this.#playing.push(playing);
|
||||
// an entity this client doesn't have yet, like one whose animator is being made, has until the next frame to
|
||||
// turn up
|
||||
if (options.follow !== undefined && !at) return playing;
|
||||
this.#start(playing);
|
||||
if (!playing.voice && !options.loop) playing.done = true;
|
||||
return playing;
|
||||
@@ -205,7 +203,10 @@ export class Sounds {
|
||||
}
|
||||
this.#playing = this.#playing.filter((playing) => !playing.done);
|
||||
for (const playing of this.#playing) {
|
||||
if (!playing.voice) this.#start(playing);
|
||||
if (playing.voice) continue;
|
||||
this.#start(playing);
|
||||
// one waiting for its entity that can't play now never will
|
||||
if (!playing.voice && !playing.options.loop) playing.done = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user