Skip to content

Commit

Permalink
Component depth effected by upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhinous committed Jul 25, 2024
1 parent 5ff405a commit c0bde98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/VehiclesCompat/VehiclesCompat/VehicleArmorPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public static void ApplyDamageCE(this VehicleStatHandler stats, ref DamageInfo d

public static bool TryPenetrateComponents(VehicleStatHandler stats, ref DamageInfo dinfo, List<VehicleComponent> components, VehicleComponent.VehiclePartDepth hitDepth, StringBuilder report)
{
var componentsAtHitDepth = components.Where(comp => comp.props.depth == hitDepth && comp.HealthPercent > 0).OrderBy(x => Rand.Value * x.props.hitWeight);
var componentsAtHitDepth = components.Where(comp => comp.Depth == hitDepth && comp.HealthPercent > 0).OrderBy(x => Rand.Value * x.props.hitWeight);
report?.AppendLine($"components=({string.Join(",", components.Select(c => c.props.label))})");
report?.AppendLine($"hitDepth = {hitDepth}");
report?.AppendLine($"components at hitDepth {hitDepth}: ({string.Join(",", componentsAtHitDepth.Select(comp => comp.props.label))})");
Expand Down

0 comments on commit c0bde98

Please sign in to comment.