Skip to content

OnHorseUnhitch

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnHorseUnhitch( RidableHorse horse, HitchSpot hitchSpot )
{
    Puts( "OnHorseUnhitch works!" );
}

Location

  • HitchTrough::Unhitch(RidableHorse horse)
csharp
//---
	for (int i = 0; i < array.Length; i++)
	{
		HitchTrough.HitchSpot hitchSpot = array[i];
		if (hitchSpot.GetHorse(base.isServer) == horse)
		{
			if (Interface.CallHook("OnHorseUnhitch", horse, hitchSpot) != null)
			{
				return;
			}
			hitchSpot.SetOccupiedBy(null);
			horse.SetHitch(null);
//---

Released under the MIT License.