diff --git a/php/api/logGameCrash.php b/php/api/logGameCrash.php new file mode 100644 index 00000000..e0783fe9 --- /dev/null +++ b/php/api/logGameCrash.php @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/scripts/mk.js b/scripts/mk.js index 51359c3a..3f4ab003 100755 --- a/scripts/mk.js +++ b/scripts/mk.js @@ -18119,86 +18119,100 @@ function cycle() { runOneFrame(); } var decorPos = {}; +var lastErrorTs = 0; function runOneFrame() { - handleGamepadEvents(); - if (!timeTrialMode()) { - for (var i=0;i maxPush*maxPush) { - var modPush = Math.sqrt(modPush2); - oKart.pushVector[0] *= maxPush/modPush; - oKart.pushVector[1] *= maxPush/modPush; - } - if (!oKart.shift) - oKart.shift = [0,0,0]; - oKart.shift[0] += oKart.pushVector[0]; - oKart.shift[1] += oKart.pushVector[1]; - delete oKart.pushVector; + try { + handleGamepadEvents(); + if (!timeTrialMode()) { + for (var i=0;i 0) - trajetflags[2] = "1"; - else if (oKart.rotincdir < 0) - trajetflags[3] = "1"; - } - if (trajetflags.indexOf("1") != -1) - trajetplus.push(trajetflags.join("")); - iTrajet.push(trajetplus); + for (var i=0;i maxPush*maxPush) { + var modPush = Math.sqrt(modPush2); + oKart.pushVector[0] *= maxPush/modPush; + oKart.pushVector[1] *= maxPush/modPush; + } + if (!oKart.shift) + oKart.shift = [0,0,0]; + oKart.shift[0] += oKart.pushVector[0]; + oKart.shift[1] += oKart.pushVector[1]; + delete oKart.pushVector; } } + for (var i=0;i 0) + trajetflags[2] = "1"; + else if (oKart.rotincdir < 0) + trajetflags[3] = "1"; + } + if (trajetflags.indexOf("1") != -1) + trajetplus.push(trajetflags.join("")); + iTrajet.push(trajetplus); + } + } + } + if (course != "CM") { + var aRankScores = getRankScores(); + for (var i=0;i 10000) { + o_xhr("logGameCrash.php", "error="+encodeURIComponent(e.stack), function() { + return true; + }); + lastErrorTs = errorTs; + } } - moveItems(); - moveDecor(); - if (oSpecCam) - oSpecCam.move(); - if (!oPlayers[0].cpu && !oPlayers[0].loose) - handleChallengeEvents(); - if (refreshDatas) - resetDatas(); - handleAudio(); - render(); } var gameControls = {