diff --git a/app/net/packets/action-ack.js b/app/net/packets/action-ack.js new file mode 100644 index 0000000..1761918 --- /dev/null +++ b/app/net/packets/action-ack.js @@ -0,0 +1,3 @@ +import Packet from '@/net/packet.js'; + +export default class ActionAck extends Packet {} diff --git a/app/server/engine.js b/app/server/engine.js index dd6e719..56ec18f 100644 --- a/app/server/engine.js +++ b/app/server/engine.js @@ -249,6 +249,17 @@ export default class Engine { break; } } + if (payload.ack) { + this.server.send( + connection, + { + type: 'ActionAck', + payload: { + ack: payload.ack, + }, + }, + ); + } } this.incomingActions.set(connection, []); }