diff --git a/fc/js/nes-embed.js b/fc/js/nes-embed.js index d9e9fc1..971e27e 100644 --- a/fc/js/nes-embed.js +++ b/fc/js/nes-embed.js @@ -122,7 +122,14 @@ window.vm = { }, onCtrlDire: function(t, e) { this.onCtrlDire; - var i = Math.round((t + 180) / 45) % 8; + var i ;//= Math.round((t + 180) / 45) % 8; + var abst = Math.abs(t); + if((abst>=40&&abst<=50)||(abst>=130&&abst<=140)){ + i = Math.round((t + 180) / 45) % 8; + } + else{ + i = Math.round((t + 180) / 90) % 4*2; + } this.oldDire != i && (e(i, t), this.oldDire = i) }, simulateKeyPress: function(t, e) {