Skip to content

OnBuildingSplit

Usage

  • No return behavior

Example Autogenerated

csharp
private void OnBuildingSplit( Building building, uint newID )
{
    Puts( "OnBuildingSplit works!" );
}

Location

  • ServerBuildingManager::Split(BuildingManager/Building building)
csharp
//---
{
	while (building.HasBuildingBlocks())
	{
		BaseEntity arg_47_0 = building.buildingBlocks[0];
		uint newID = BuildingManager.server.NewBuildingID();
		Interface.CallHook("OnBuildingSplit", building, newID);
		arg_47_0.EntityLinkBroadcast<BuildingBlock>(delegate(BuildingBlock b)
		{
			b.AttachToBuilding(newID);
		});
	}
//---

Released under the MIT License.