Oops, forgot the 'to' field in Yield messages

This commit is contained in:
Tissevert 2020-01-30 15:21:09 +01:00
parent fb3bb64ff6
commit 313d91bcaf

View file

@ -42,7 +42,7 @@ function initMessageHandlers() {
var state = states.get(gameID); var state = states.get(gameID);
if(state != undefined) { if(state != undefined) {
switch(compare(state.latest.public.coordinates, o.message.latestKnown)) { switch(compare(state.latest.public.coordinates, o.message.latestKnown)) {
case -1: Messaging.send({tag: "Yield", onGameID: gameID}); case -1: Messaging.send({tag: "Yield", onGameID: gameID, to: o.from});
case 1: Messaging.send({tag: "Share", gameSave: state.latest}); case 1: Messaging.send({tag: "Share", gameSave: state.latest});
} }
} }