Skip to content

OnCatapultFireForce

Called before a catapult is fired, returning a float changes the force of the shot.

Usage

  • Return TYPE to prevent default behavior

Example Autogenerated

csharp
private void OnCatapultFireForce( Catapult instance, BasePlayer shooter, float num2 )
{
    Puts( "OnCatapultFireForce works!" );
}

Location

  • Catapult::Fire(BasePlayer shooter, float force)
csharp
//---
	float num = Mathf.Lerp(2f, 1f, Mathf.Clamp01(force));
	float num2 = Mathf.Lerp(0.5f, 1f, Mathf.Clamp01(force));
	bool flag = true;
	Vector3 firingPos = this.muzzle.position;
	BasePlayer passenger = base.GetPassenger();
	object returnvar = Interface.CallHook("OnCatapultFireForce", this, shooter, num2);
	if (returnvar is float)
	{
		num2 = (float)returnvar;
	}
	if (passenger != null)
//---

Released under the MIT License.