Skip to content

OnStructureRotate

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

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

Location

  • BuildingBlock::DoRotation(BaseEntity/RPCMessage msg)
csharp
//---
	}
	if (!this.blockDefinition.canRotateAfterPlacement)
	{
		return;
	}
	if (Interface.CallHook("OnStructureRotate", this, msg.player) != null)
	{
		return;
	}
	base.transform.localRotation *= Quaternion.Euler(this.blockDefinition.rotationAmount);
	base.RefreshEntityLinks();
//---

Released under the MIT License.