Skip to content

Commit

Permalink
Merge pull request #3302 from Rhinous/vehicles-update
Browse files Browse the repository at this point in the history
Vehicle Framework - Component depth effected by upgrades
  • Loading branch information
N7Huntsman authored Jul 27, 2024
2 parents 7c04b6d + c0bde98 commit ddcc4dc
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 ddcc4dc

Please sign in to comment.