Commit 7ed6d496 authored by ElderLich's avatar ElderLich

Bug Fix: Fix duel voice reactions playing for the wrong side

Normalizes duel voice ownership so damage, draw, and turn-start lines play for the correct player, and fixes situation-based voice selection falling back incorrectly to generic lines.
parent e7ed55c3
...@@ -144,7 +144,7 @@ namespace MDPro3.Duel ...@@ -144,7 +144,7 @@ namespace MDPro3.Duel
var tempStrings = new List<string>(); var tempStrings = new List<string>();
foreach (var e in entry.rawKvp) foreach (var e in entry.rawKvp)
if (e.Value.situations != null && e.Value.situations.Length > 0) if (e.Value.situations != null && e.Value.situations.Length > 0)
if (Array.IndexOf(e.Value.situations, situation) > 0) if (Array.IndexOf(e.Value.situations, situation) >= 0)
tempStrings.Add(e.Value.shortName); tempStrings.Add(e.Value.shortName);
if (tempStrings.Count > 0) if (tempStrings.Count > 0)
returnValue = tempStrings[UnityEngine.Random.Range(0, tempStrings.Count)]; returnValue = tempStrings[UnityEngine.Random.Range(0, tempStrings.Count)];
...@@ -681,4 +681,4 @@ namespace MDPro3.Duel ...@@ -681,4 +681,4 @@ namespace MDPro3.Duel
return returnValue; return returnValue;
} }
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment