Skip to content

Commit

Permalink
Added simplified HandicapHelper overload.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmcbride committed Oct 14, 2014
1 parent d3b6af8 commit d49314c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions InSimDotNet/Helpers/HandicapHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,19 @@ public static void SetHandicap(IS_HCP packet, CarFlags cars, byte H_Mass = 0, by
}
}
}

/// <summary>
/// Creates an IS_HCP packet and sets the various car handicaps.
/// </summary>
/// <param name="cars">The cars to set the handicap for.</param>
/// <param name="H_Mass">The added mass to set in kilograms (0 - 200).</param>
/// <param name="H_TRes">The intake restriction to set (0 - 50).</param>
/// <returns>An IS_HCP packet.</returns>
public static IS_HCP SetHandicap(CarFlags cars, byte H_Mass = 0, byte H_TRes = 0)
{
var packet = new IS_HCP();
SetHandicap(packet, cars, H_Mass, H_TRes);
return packet;
}
}
}

0 comments on commit d49314c

Please sign in to comment.