bug fix in combo break

This commit is contained in:
2025-09-20 06:29:18 +02:00
parent da6ca9cc4c
commit e802cf475c
3 changed files with 15 additions and 17 deletions

View File

@@ -750,7 +750,6 @@ MonoBehaviour:
ignoreDefense: 0 ignoreDefense: 0
activeRagdoll: 0 activeRagdoll: 0
senselessTime: 0 senselessTime: 0
blockInputBeforeTime: 0.5
unlockRotationTime: 0.5 unlockRotationTime: 0.5
lerpPositionTowardsTarget: 1 lerpPositionTowardsTarget: 1
maxLerpDistance: 3.5 maxLerpDistance: 3.5
@@ -2726,8 +2725,7 @@ MonoBehaviour:
ignoreDefense: 0 ignoreDefense: 0
activeRagdoll: 0 activeRagdoll: 0
senselessTime: 0 senselessTime: 0
blockInputBeforeTime: 0.5 unlockRotationTime: 0.5
unlockRotationTime: 0.7
lerpPositionTowardsTarget: 1 lerpPositionTowardsTarget: 1
maxLerpDistance: 3.5 maxLerpDistance: 3.5
positionLerpSpeed: 2 positionLerpSpeed: 2
@@ -5203,8 +5201,7 @@ MonoBehaviour:
ignoreDefense: 0 ignoreDefense: 0
activeRagdoll: 0 activeRagdoll: 0
senselessTime: 0 senselessTime: 0
blockInputBeforeTime: 0.5 unlockRotationTime: 0.5
unlockRotationTime: 0.7
lerpPositionTowardsTarget: 1 lerpPositionTowardsTarget: 1
maxLerpDistance: 3.5 maxLerpDistance: 3.5
positionLerpSpeed: 2 positionLerpSpeed: 2
@@ -5724,7 +5721,6 @@ MonoBehaviour:
ignoreDefense: 0 ignoreDefense: 0
activeRagdoll: 0 activeRagdoll: 0
senselessTime: 0 senselessTime: 0
blockInputBeforeTime: 0.5
unlockRotationTime: 0.7 unlockRotationTime: 0.7
lerpPositionTowardsTarget: 0 lerpPositionTowardsTarget: 0
maxLerpDistance: 3.5 maxLerpDistance: 3.5
@@ -6496,7 +6492,7 @@ AnimatorController:
m_Type: 9 m_Type: 9
m_DefaultFloat: 0 m_DefaultFloat: 0
m_DefaultInt: 0 m_DefaultInt: 0
m_DefaultBool: 1 m_DefaultBool: 0
m_Controller: {fileID: 9100000} m_Controller: {fileID: 9100000}
- m_Name: HitDirection - m_Name: HitDirection
m_Type: 3 m_Type: 3
@@ -26516,7 +26512,6 @@ MonoBehaviour:
ignoreDefense: 1 ignoreDefense: 1
activeRagdoll: 0 activeRagdoll: 0
senselessTime: 0 senselessTime: 0
blockInputBeforeTime: 1
unlockRotationTime: 0.7 unlockRotationTime: 0.7
lerpPositionTowardsTarget: 1 lerpPositionTowardsTarget: 1
maxLerpDistance: 3.5 maxLerpDistance: 3.5
@@ -47865,7 +47860,6 @@ MonoBehaviour:
ignoreDefense: 0 ignoreDefense: 0
activeRagdoll: 0 activeRagdoll: 0
senselessTime: 0 senselessTime: 0
blockInputBeforeTime: 0.5
unlockRotationTime: 0.7 unlockRotationTime: 0.7
lerpPositionTowardsTarget: 0 lerpPositionTowardsTarget: 0
maxLerpDistance: 3.5 maxLerpDistance: 3.5
@@ -48019,7 +48013,6 @@ MonoBehaviour:
ignoreDefense: 0 ignoreDefense: 0
activeRagdoll: 0 activeRagdoll: 0
senselessTime: 0 senselessTime: 0
blockInputBeforeTime: 0.5
unlockRotationTime: 0.7 unlockRotationTime: 0.7
lerpPositionTowardsTarget: 0 lerpPositionTowardsTarget: 0
maxLerpDistance: 3.5 maxLerpDistance: 3.5
@@ -48421,7 +48414,6 @@ MonoBehaviour:
ignoreDefense: 1 ignoreDefense: 1
activeRagdoll: 0 activeRagdoll: 0
senselessTime: 0 senselessTime: 0
blockInputBeforeTime: 0.5
unlockRotationTime: 0.7 unlockRotationTime: 0.7
lerpPositionTowardsTarget: 1 lerpPositionTowardsTarget: 1
maxLerpDistance: 3.5 maxLerpDistance: 3.5
@@ -49309,7 +49301,6 @@ MonoBehaviour:
ignoreDefense: 1 ignoreDefense: 1
activeRagdoll: 0 activeRagdoll: 0
senselessTime: 0 senselessTime: 0
blockInputBeforeTime: 0.5
unlockRotationTime: 0.7 unlockRotationTime: 0.7
lerpPositionTowardsTarget: 1 lerpPositionTowardsTarget: 1
maxLerpDistance: 3.5 maxLerpDistance: 3.5

View File

@@ -41,9 +41,9 @@ namespace Invector.vMelee
[Tooltip("Time to keep Ragdoll active if activeRagdoll is true.")] [Tooltip("Time to keep Ragdoll active if activeRagdoll is true.")]
public float senselessTime; public float senselessTime;
[Header("Attack Flow")] //[Header("Attack Flow")]
[Tooltip("Normalized time point to start allowing the next attack input.")] //[Tooltip("Normalized time point to start allowing the next attack input.")]
public float blockInputBeforeTime = 0.5f; //public float blockInputBeforeTime = 0.5f;
[Header("Combo & Movement")] [Header("Combo & Movement")]
[Tooltip("Normalized time to unlock rotation, allowing the player to aim the next attack in a combo. Set to 1 to disable.")] [Tooltip("Normalized time to unlock rotation, allowing the player to aim the next attack in a combo. Set to 1 to disable.")]
@@ -248,9 +248,10 @@ namespace Invector.vMelee
BlockAttack(false); BlockAttack(false);
// --- END MODIFICATION --- // --- END MODIFICATION ---
} }
private void ManageComboLogic(float currentNormalizedTime) private void ManageComboLogic(float currentNormalizedTime)
{ {
/*
if (blockInputBeforeTime > 0f) if (blockInputBeforeTime > 0f)
{ {
if (currentNormalizedTime >= blockInputBeforeTime) if (currentNormalizedTime >= blockInputBeforeTime)
@@ -262,7 +263,8 @@ namespace Invector.vMelee
BlockAttack(true); // Block input BlockAttack(true); // Block input
} }
} }
*/
if (!useComboTimingWindow) return; if (!useComboTimingWindow) return;
bool isInsideWindow = currentNormalizedTime >= comboWindowStartTime; bool isInsideWindow = currentNormalizedTime >= comboWindowStartTime;
@@ -273,9 +275,14 @@ namespace Invector.vMelee
{ {
_comboWindowEffectTriggered = true; _comboWindowEffectTriggered = true;
TimeController.Instance.SetTimeScaleForRealTimeSec(comboWindowTimeScale, comboWindowDuration, false); TimeController.Instance.SetTimeScaleForRealTimeSec(comboWindowTimeScale, comboWindowDuration, false);
BlockAttack(false);
if (debug) Debug.Log($"({damageType}) COMBO WINDOW OPEN. Accepting input."); if (debug) Debug.Log($"({damageType}) COMBO WINDOW OPEN. Accepting input.");
} }
} }
else
{
BlockAttack(true);
}
} }
// --- Other methods remain unchanged --- // --- Other methods remain unchanged ---