import abstract class worldIDestructibleSpotsSystem extends IGameSystem
{
}

import class gameDestructibleSpotsSystem extends worldIDestructibleSpotsSystem
{

	protected event OnNotifyAboutFracture( localPlayerObj : weak< GameObject >, fracturePos : Vector4 )
	{
		var broadcaster : StimBroadcasterComponent;
		var maxDistToPlayerSqr : Float;
		var stimRange : Float;
		var game : GameInstance;
		maxDistToPlayerSqr = 10.0 * 10.0;
		stimRange = 10.0;
		if( Vector4.DistanceSquared( localPlayerObj.GetWorldPosition(), fracturePos ) > maxDistToPlayerSqr )
		{
			return true;
		}
		broadcaster = localPlayerObj.GetStimBroadcasterComponent();
		if( broadcaster )
		{
			game = localPlayerObj.GetGame();
			if( VehicleComponent.IsMountedToVehicle( game, localPlayerObj ) )
			{
				broadcaster.TriggerSingleBroadcast( localPlayerObj, gamedataStimType.CrowdIllegalAction, stimRange );
			}
		}
		return true;
	}

}

