diff --git a/Assets/PerfectWorld/Scripts/Move/EC_CDR.cs b/Assets/PerfectWorld/Scripts/Move/EC_CDR.cs index f13384c6c1..53d239eba0 100644 --- a/Assets/PerfectWorld/Scripts/Move/EC_CDR.cs +++ b/Assets/PerfectWorld/Scripts/Move/EC_CDR.cs @@ -290,6 +290,21 @@ namespace BrewMonster //bool hasHit = CollideWithEnv_BoxCast(vStart, vDelta, vExt, mask, // out RaycastHit hit, out float fFraction, out Vector3 hitNormal, out bool bStartSolid); Vector3 posFoot = vStart - Vector3.up * vExt.y; + //if (Physics.BoxCast(vStart, vExt, (vStart + Vector3.down).normalized, out RaycastHit hit1, Quaternion.identity, vExt.y, mask)) + //{ + // if (hit1.point.y > posFoot.y) + // { + // Debug.LogError("hit.point.y > posFoot.y"); + // posFoot.y = hit1.point.y; + // } + //} + if (Physics.Raycast(vStart, (vStart + Vector3.down).normalized, out RaycastHit hit1, vExt.y, mask)) + { + if (hit1.point.y > posFoot.y) + { + posFoot.y = hit1.point.y; + } + } bool bClear = !Physics.Raycast(posFoot, (posFoot + vDelta).normalized, out RaycastHit hit, fDeltaDist, mask); nTry++; if (bClear) @@ -305,8 +320,6 @@ namespace BrewMonster // if (CDRInfo.vTPNormal.y < CDRInfo.fSlopeThresh) CDRInfo.vTPNormal = Vector3.up; // return; //} - Debug.DrawLine(posFoot, hit.point, Color.green, 10f); - vStart = hit.point + Vector3.up * vExt.y; vFinalPos = vStart; //CDRInfo.fMoveDist += (fDeltaDist * fFraction); @@ -319,7 +332,15 @@ namespace BrewMonster //float skin = 0.01f; posFoot = vStart - Vector3.up * vExt.y + Vector3.up * CDRInfo.fStepHeight; Vector3 vStartUp = new Vector3(0f, CDRInfo.fStepHeight, 0f); - bPull = !Physics.Raycast(posFoot, (posFoot + vStartUp).normalized, out hit, CDRInfo.fStepHeight, mask); + //if (Physics.Raycast(vStart, (vStart + Vector3.down).normalized, out hit1, vExt.y, mask)) + //{ + // if (hit1.point.y > posFoot.y) + // { + // Debug.LogError("hit.point.y > posFoot.y"); + // posFoot.y = hit1.point.y + CDRInfo.fStepHeight; + // } + //} + bPull = !Physics.Raycast(posFoot, (Vector3.up).normalized, out hit, CDRInfo.fStepHeight, mask); if (bPull) { vStart += Vector3.up * CDRInfo.fStepHeight; diff --git a/Assets/Scenes/a61.unity b/Assets/Scenes/a61.unity index bf0e9f9c9d..655b49a45f 100644 --- a/Assets/Scenes/a61.unity +++ b/Assets/Scenes/a61.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7d0c92bda31fb016ed4bbb1b3670ed7cce73d854e25ddac2abb3d36277a2e4a2 -size 200515696 +oid sha256:5f0e60c802cf01eacf4cb214f00e8b7e04dcae61d68d6ed1ce599f2ee0f09db9 +size 200516379 diff --git a/Assets/Scripts/CECGameRun.cs b/Assets/Scripts/CECGameRun.cs index 0ca7694661..60589d0be0 100644 --- a/Assets/Scripts/CECGameRun.cs +++ b/Assets/Scripts/CECGameRun.cs @@ -49,7 +49,8 @@ public partial class CECGameRun // glb_ErrorOutput(ECERR_FAILEDTOCALL, "CECGameRun::Init", __LINE__); // return false; //} - m_InstTab.Add(161, new CECInstance()); + if(!m_InstTab.ContainsKey(161)) + m_InstTab.Add(161, new CECInstance()); AddressableManager.Instance.OnDispose += Dispose; } diff --git a/Assets/Scripts/CECHostPlayer.cs b/Assets/Scripts/CECHostPlayer.cs index 229900d8b7..b82ef09f16 100644 --- a/Assets/Scripts/CECHostPlayer.cs +++ b/Assets/Scripts/CECHostPlayer.cs @@ -437,6 +437,7 @@ namespace BrewMonster case int value when value == EC_MsgDef.MSG_HST_OWNEXTPROP: OnMsgHstExtProp(Msg); break; + case int value when value == EC_MsgDef.MSG_HST_TARGETISFAR: OnMsgHstTargetIsFar(Msg); break; } @@ -4770,6 +4771,19 @@ namespace BrewMonster m_BasicProps.iResilience = pCmd.resilience; m_BasicProps.iVigour = pCmd.vigour; } + + void OnMsgHstTargetIsFar( ECMSG Msg) + { + // TO DO: fix later + //if(CmdNormalAttack(true, m_pComboSkill != null, 0, -1) ) + // AP_ActionEvent(AP_EVENT_MELEEOUTOFRANGE, 1); + + if (CmdNormalAttack(true, false, 0, -1)) + { + //AP_ActionEvent(AP_EVENT_MELEEOUTOFRANGE, 1); + } + } + } public enum StateAnim diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 193a05d646..6ec4c82730 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -12,7 +12,7 @@ TagManager: - Water - UI - Terrain - - Bush + - Brush - - -