Skip to content

Commit

Permalink
Fix issues in conversion process
Browse files Browse the repository at this point in the history
  • Loading branch information
henbagle committed Dec 31, 2023
1 parent d5c3712 commit d607bf1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions ME3Tweaks.Wwiser/BankConversion/AttenuationConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ public class AttenuationConverter(BankSerializationContext from, BankSerializati
{
public void Convert(Attenuation item)
{
item.Curves.Insert(2, item.Curves[1].Clone());
item.CurveToUse.CurveMap[2] = 2;
for(var i = 3; i < item.CurveToUse.CurveMap.Length; i++)
if (item.Curves.Count >= 2)
{
if (item.CurveToUse.CurveMap[i] > -1) item.CurveToUse.CurveMap[i]++;
item.Curves.Insert(2, item.Curves[1].Clone());
item.CurveToUse.CurveMap[2] = 2;
for(var i = 3; i < item.CurveToUse.CurveMap.Length; i++)
{
if (item.CurveToUse.CurveMap[i] > -1) item.CurveToUse.CurveMap[i]++;
}
}

foreach (var c in item.Curves)
{
// Could be mass effect le only
RtpcConverter.ConvertRtpcFloatLt0(c);
}
}
Expand Down
2 changes: 1 addition & 1 deletion ME3Tweaks.Wwiser/Model/Action/Specific/SetGameParameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace ME3Tweaks.Wwiser.Model.Action.Specific;

public class SetGameParameter
public class SetGameParameter : ISpecificParams
{
[FieldOrder(0)]
[SerializeWhenVersion(89, ComparisonOperator.GreaterThan)]
Expand Down

0 comments on commit d607bf1

Please sign in to comment.