Skip to content

Commit

Permalink
Merge pull request #429 from cwtickle/develop
Browse files Browse the repository at this point in the history
[ver8.0.2] ゲームオーバー時の200ミリ秒遅延により、 ハイスコア表示がおかしくなることがある問題を修正
  • Loading branch information
cwtickle committed Sep 16, 2019
2 parents 4db78ac + 1ba19c7 commit 7dd8e2d
Showing 1 changed file with 22 additions and 23 deletions.
45 changes: 22 additions & 23 deletions js/danoni_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
*
* Source by tickle
* Created : 2018/10/08
* Revised : 2019/09/15
* Revised : 2019/09/16
*
* https://github.com/cwtickle/danoniplus
*/
const g_version = `Ver 8.0.1`;
const g_revisedDate = `2019/09/15`;
const g_version = `Ver 8.0.2`;
const g_revisedDate = `2019/09/16`;
const g_alphaVersion = ``;

// カスタム用バージョン (danoni_custom.js 等で指定可)
Expand Down Expand Up @@ -7165,16 +7165,14 @@ function MainInit() {
} else if (setKey === g_headerObj.keyTitleBack) {
g_audio.pause();
clearTimeout(g_timeoutEvtId);
setTimeout(_ => {
clearWindow();
if (keyIsDown(16)) {
g_gameOverFlg = true;
g_finishFlg = false;
resultInit();
} else {
titleInit();
}
}, 200);
clearWindow();
if (keyIsDown(16)) {
g_gameOverFlg = true;
g_finishFlg = false;
resultInit();
} else {
titleInit();
}
}

for (let j = 0; j < C_BLOCK_KEYS.length; j++) {
Expand Down Expand Up @@ -7993,6 +7991,17 @@ function MainInit() {
clearWindow();
resultInit();
}, 100);
} else if (g_workObj.lifeVal === 0) {

// ライフ制&ライフ0の場合は途中終了
if (g_workObj.lifeBorder === 0) {
g_audio.pause();
clearTimeout(g_timeoutEvtId);
clearWindow();
g_gameOverFlg = true;
g_finishFlg = false;
resultInit();
}
}
}
g_timeoutEvtId = setTimeout(_ => flowTimeline(), 1000 / 60);
Expand Down Expand Up @@ -8285,16 +8294,6 @@ function lifeDamage() {
g_workObj.lifeVal -= g_workObj.lifeDmg;
if (g_workObj.lifeVal <= 0) {
g_workObj.lifeVal = 0;
if (g_workObj.lifeBorder === 0) {
g_audio.pause();
clearTimeout(g_timeoutEvtId);
setTimeout(_ => {
clearWindow();
g_gameOverFlg = true;
g_finishFlg = false;
resultInit();
}, 200);
}
} else if (g_workObj.lifeVal < g_workObj.lifeBorder) {
lifeColor = C_CLR_DEFAULTLIFE;
} else {
Expand Down

0 comments on commit 7dd8e2d

Please sign in to comment.