From c152b05b606afbccc877188c48255b1f4377b16b Mon Sep 17 00:00:00 2001 From: shangfengh <3495281661@qq.com> Date: Fri, 26 May 2023 08:19:55 +0800 Subject: [PATCH] fix: :ambulance: fix the bug about climbing the windows --- docs/版本更新说明.md | 7 +++++-- logic/GameClass/GameObj/Map/Window.cs | 4 +++- logic/Gaming/ActionManager.cs | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/版本更新说明.md b/docs/版本更新说明.md index 4ed07c0..c6065cc 100644 --- a/docs/版本更新说明.md +++ b/docs/版本更新说明.md @@ -79,7 +79,10 @@ - fix:修复了可以学习完成作业的问题 - fix:修复了HaveTea越界的问题 -# 5月25日更新 +# 5月25日24:00更新 - fix:修复了终局得分的问题 - fix:修复了开校门的问题 -- docs:摧毁一个TechOtaku的机器人,得50分。 \ No newline at end of file +- docs:摧毁一个TechOtaku的机器人,得50分。 + +# 5月26日更新 +- fix:修复了卡窗的问题 \ No newline at end of file diff --git a/logic/GameClass/GameObj/Map/Window.cs b/logic/GameClass/GameObj/Map/Window.cs index e864a55..5ea244f 100644 --- a/logic/GameClass/GameObj/Map/Window.cs +++ b/logic/GameClass/GameObj/Map/Window.cs @@ -48,13 +48,15 @@ namespace GameClass.GameObj public bool TryToClimb(ICharacter character) { lock (gameObjLock) + { if (whoIsClimbing == null) { stage = new(0, 0); whoIsClimbing = (Character)character; return true; } - else return false; + } + return false; } public void FinishClimbing() { diff --git a/logic/Gaming/ActionManager.cs b/logic/Gaming/ActionManager.cs index d7737e0..371014a 100644 --- a/logic/Gaming/ActionManager.cs +++ b/logic/Gaming/ActionManager.cs @@ -469,8 +469,8 @@ namespace Gaming lock (player.ActionLock) { if (!player.StartThread(stateNum, RunningStateType.RunningActively)) return; - player.ReSetPos(windowToPlayer + windowForClimb.Position); windowForClimb.Enter2Stage(windowForClimb.Position - 2 * windowToPlayer); + player.ReSetPos(windowToPlayer + windowForClimb.Position); } player.MoveSpeed = player.SpeedOfClimbingThroughWindows; @@ -484,6 +484,7 @@ namespace Gaming { if (stateNum == player.StateNum) { + player.ReSetPos(windowForClimb.Stage); player.SetPlayerStateNaturally(); windowForClimb.FinishClimbing(); }