Skip to content

Commit

Permalink
[sim] timeout on emitting actionComplete
Browse files Browse the repository at this point in the history
  • Loading branch information
democat3457 committed Nov 19, 2024
1 parent c9144fd commit 2ba0373
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/client/debug/simulator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
}

.robot {
transition: all 0.75s ease;
transition: all 0.75s ease; // needs to match simulator.ts timeout
}
4 changes: 3 additions & 1 deletion src/server/simulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ export class VirtualBotTunnel extends BotTunnel {
}

private emitActionComplete() {
this.emitter.emit("actionComplete", { success: true });
setTimeout(() =>
this.emitter.emit("actionComplete", { success: true })
, 750); // needs to match simulator.scss animation timeout
}

send(packet: Packet) {
Expand Down

0 comments on commit 2ba0373

Please sign in to comment.