OnCatapultFireForce
Called before a catapult is fired, returning a float changes the force of the shot.
Usage
- Return type float to prevent default behavior
Example Autogenerated
csharp
private float? OnCatapultFireForce( Catapult instance, BasePlayer shooter, float num2 )
{
Puts( "OnCatapultFireForce works!" );
return null;
}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 = muzzle.position;
BasePlayer passenger = GetPassenger();
object obj = Interface.CallHook("OnCatapultFireForce", this, shooter, num2);
if (obj is float)
{
num2 = (float)obj;
}
if (passenger != null)
//---