comment log

This commit is contained in:
VDH
2026-03-10 14:00:49 +07:00
parent dbb1cac4a6
commit fbcb3dc5e5
6 changed files with 57 additions and 486 deletions
@@ -1523,3 +1523,4 @@ public enum GfxSkillValType
@@ -212,7 +212,6 @@ namespace BrewMonster
m_fMoveTime = 0.0f;
iMoveMode |= (int)GPMoveMode.GP_MOVE_DEAD;
BMLogger.LogError($"HoangDev: SendMoveCmd m_wMoveStamp={m_wMoveStamp}");
UnityGameSession.Instance.c2s_CmdPlayerMove(vCurPos, vCurPos, iTime/* MOVECMD_INTERVAL */, fSpeed, iMoveMode, m_wMoveStamp++);
m_vLastSevPos = EC_Utility.ToA3DVECTOR3(vCurPos);
+4 -4
View File
@@ -438,10 +438,10 @@ namespace BrewMonster
// Log position BEFORE flashmove processing
// 记录闪移处理前的位置
A3DVECTOR3 vHostPosBefore = EC_Utility.ToA3DVECTOR3(transform.position);
BMLogger.LogError($"[DISTANCE_DEBUG] OBJECT_CAST_POS_SKILL: Received, skillID={pCmd.skill}, " +
/* BMLogger.LogError($"[DISTANCE_DEBUG] OBJECT_CAST_POS_SKILL: Received, skillID={pCmd.skill}, " +
$"hostPosBefore=({vHostPosBefore.x:F2}, {vHostPosBefore.y:F2}, {vHostPosBefore.z:F2}), " +
$"destPos=({pCmd.pos.x:F2}, {pCmd.pos.y:F2}, {pCmd.pos.z:F2}), " +
$"target={pCmd.target}, distanceBefore={A3d_Magnitude(pCmd.pos - vHostPosBefore):F2}");
$"target={pCmd.target}, distanceBefore={A3d_Magnitude(pCmd.pos - vHostPosBefore):F2}");*/
// Debug.Log($"[SKILL_CAST_DEBUG] OnMsgPlayerCastSkill: Received OBJECT_CAST_POS_SKILL, skillID={pCmd.skill}, " +
// $"target={pCmd.target}, pos=({pCmd.pos.x:F2}, {pCmd.pos.y:F2}, {pCmd.pos.z:F2}), " +
@@ -576,11 +576,11 @@ namespace BrewMonster
// Log position AFTER updating position tracking
// 记录更新位置跟踪后的位置
A3DVECTOR3 vHostPosAfter = EC_Utility.ToA3DVECTOR3(transform.position);
BMLogger.LogError($"[DISTANCE_DEBUG] OBJECT_CAST_POS_SKILL: After position update, skillID={pSkill.GetSkillID()}, " +
/* BMLogger.LogError($"[DISTANCE_DEBUG] OBJECT_CAST_POS_SKILL: After position update, skillID={pSkill.GetSkillID()}, " +
$"hostPosAfter=({vHostPosAfter.x:F2}, {vHostPosAfter.y:F2}, {vHostPosAfter.z:F2}), " +
$"SetHostLastPos=({pCmd.pos.x:F2}, {pCmd.pos.y:F2}, {pCmd.pos.z:F2}), " +
$"destPos=({pCmd.pos.x:F2}, {pCmd.pos.y:F2}, {pCmd.pos.z:F2}), " +
$"executeTime={nExecuteTime}, positionChange={A3d_Magnitude(pCmd.pos - vHostPosBefore):F2}");
$"executeTime={nExecuteTime}, positionChange={A3d_Magnitude(pCmd.pos - vHostPosBefore):F2}");*/
// Debug.Log($"[SKILL_CAST_DEBUG] OnMsgPlayerCastSkill: OBJECT_CAST_POS_SKILL - Created WORK_FLASHMOVE, " +
// $"skillID={pSkill.GetSkillID()}, executeTime={nExecuteTime}, destPos=({pCmd.pos.x:F2}, {pCmd.pos.y:F2}, {pCmd.pos.z:F2}), " +
-1
View File
@@ -30,7 +30,6 @@ namespace BrewMonster
public void OnMsgHstSetMoveStamp(ECMSG Msg)
{
cmd_set_move_stamp pCmd = GPDataTypeHelper.FromBytes<cmd_set_move_stamp>((byte[])Msg.dwParam1);
BMLogger.LogError($"OnMsgHstSetMoveStamp: Received move stamp {pCmd.move_stamp}");
m_MoveCtrl.SetMoveStamp(pCmd.move_stamp);
}
public void OnMsgHstGoto(in ECMSG Msg)
+15 -15
View File
@@ -1420,9 +1420,9 @@ namespace BrewMonster
float fMaxCut = 1.0f)
{
float fDist = A3d_Magnitude(vTargetPos - vHostPos);
bool bResult = false;
//bool bResult = false;
float fRange = 0.0f;
string reasonStr = iReason == 1 ? "melee" : (iReason == 2 ? "cast magic" : (iReason == 3 ? "talk" : $"unknown({iReason})"));
//string reasonStr = iReason == 1 ? "melee" : (iReason == 2 ? "cast magic" : (iReason == 3 ? "talk" : $"unknown({iReason})"));
switch (iReason)
{
@@ -1443,13 +1443,13 @@ namespace BrewMonster
if (fDist - fTargetRad <= fRange)
{
bResult = true;
BMLogger.Log($"[DISTANCE_DEBUG] CanTouchTarget: reason={reasonStr}, " +
//bResult = true;
/* BMLogger.Log($"[DISTANCE_DEBUG] CanTouchTarget: reason={reasonStr}, " +
$"hostPos=({vHostPos.x:F2}, {vHostPos.y:F2}, {vHostPos.z:F2}), " +
$"targetPos=({vTargetPos.x:F2}, {vTargetPos.y:F2}, {vTargetPos.z:F2}), " +
$"distance={fDist:F2}, targetRadius={fTargetRad:F2}, " +
$"requiredRange={fRange:F2}, effectiveDistance={fDist - fTargetRad:F2}, " +
$"result={bResult}, attackRange={m_ExtProps.ak.AttackRange:F2}");
$"result={bResult}, attackRange={m_ExtProps.ak.AttackRange:F2}");*/
return true;
}
@@ -1467,24 +1467,24 @@ namespace BrewMonster
{
if (fDist - fTargetRad <= fRange)
{
bResult = true;
BMLogger.Log($"[DISTANCE_DEBUG] CanTouchTarget: reason={reasonStr}, " +
//bResult = true;
/* BMLogger.Log($"[DISTANCE_DEBUG] CanTouchTarget: reason={reasonStr}, " +
$"hostPos=({vHostPos.x:F2}, {vHostPos.y:F2}, {vHostPos.z:F2}), " +
$"targetPos=({vTargetPos.x:F2}, {vTargetPos.y:F2}, {vTargetPos.z:F2}), " +
$"distance={fDist:F2}, targetRadius={fTargetRad:F2}, " +
$"requiredRange={fRange:F2}, effectiveDistance={fDist - fTargetRad:F2}, " +
$"result={bResult}, skillID={m_pPrepSkill.GetSkillID()}, attackRange={m_ExtProps.ak.AttackRange:F2}");
$"result={bResult}, skillID={m_pPrepSkill.GetSkillID()}, attackRange={m_ExtProps.ak.AttackRange:F2}");*/
return true;
}
}
else
{
bResult = true;
BMLogger.Log($"[DISTANCE_DEBUG] CanTouchTarget: reason={reasonStr}, " +
//bResult = true;
/*BMLogger.Log($"[DISTANCE_DEBUG] CanTouchTarget: reason={reasonStr}, " +
$"hostPos=({vHostPos.x:F2}, {vHostPos.y:F2}, {vHostPos.z:F2}), " +
$"targetPos=({vTargetPos.x:F2}, {vTargetPos.y:F2}, {vTargetPos.z:F2}), " +
$"distance={fDist:F2}, targetRadius={fTargetRad:F2}, " +
$"requiredRange=unlimited, result={bResult}, skillID={m_pPrepSkill.GetSkillID()}");
$"requiredRange=unlimited, result={bResult}, skillID={m_pPrepSkill.GetSkillID()}");*/
return true;
}
}
@@ -1496,7 +1496,7 @@ namespace BrewMonster
fRange = 5.0f;
if (fDist - fTargetRad <= fRange)
{
bResult = true;
//bResult = true;
return true;
}
@@ -1507,7 +1507,7 @@ namespace BrewMonster
fRange = (fTargetRad + m_fTouchRad) * 3.0f;
if (fDist < fRange)
{
bResult = true;
//bResult = true;
return true;
}
@@ -1517,12 +1517,12 @@ namespace BrewMonster
// Log distance check result for debugging
// 记录距离检查结果用于调试
BMLogger.Log($"[DISTANCE_DEBUG] CanTouchTarget: reason={reasonStr}, " +
/* BMLogger.Log($"[DISTANCE_DEBUG] CanTouchTarget: reason={reasonStr}, " +
$"hostPos=({vHostPos.x:F2}, {vHostPos.y:F2}, {vHostPos.z:F2}), " +
$"targetPos=({vTargetPos.x:F2}, {vTargetPos.y:F2}, {vTargetPos.z:F2}), " +
$"distance={fDist:F2}, targetRadius={fTargetRad:F2}, " +
$"requiredRange={fRange:F2}, effectiveDistance={fDist - fTargetRad:F2}, " +
$"result={bResult}, attackRange={m_ExtProps.ak.AttackRange:F2}");
$"result={bResult}, attackRange={m_ExtProps.ak.AttackRange:F2}");*/
return false;
}
File diff suppressed because one or more lines are too long