Skip to content

OnTurretRotate

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnTurretRotate( AutoTurret instance, BasePlayer player )
{
    Puts( "OnTurretRotate works!" );
}

Location

  • AutoTurret::FlipAim(BaseEntity/RPCMessage rpc)
csharp
//---
{
	if (this.IsOnline() || !this.IsAuthed(rpc.player) || this.booting)
	{
		return;
	}
	if (Interface.CallHook("OnTurretRotate", this, rpc.player) != null)
	{
		return;
	}
	base.transform.rotation = Quaternion.LookRotation(-base.transform.forward, base.transform.up);
	base.SendNetworkUpdate(BasePlayer.NetworkQueue.Update);
//---

Released under the MIT License.