## XIII
Class FreeHookLink

source: C:\XIII\XIII\Classes\FreeHookLink.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Effects
             |
             +--XIII.FreeHookLink

Direct Known Subclasses:None

class FreeHookLink
extends Engine.Effects

    //-----------------------------------------------------------
    // NOY USED ANYMORE
    //-----------------------------------------------------------

Variables
`HookProjectile` | `HEnd`
`Hook` | `HStart`
`int` | `LinkIndex`
`FreeHookLink` | `NextLink`
`vEnd,` | `OldvEnd`
`FreeHookLink` | `PrevLink`
`bool` | `bInitialized`
`float` | `fAddLinkCounter`

Function Summary
`void` | `Tick(float deltatime)`
    //_____________________________________________________________________________

Source Code

    00001	//-----------------------------------------------------------
    00002	// NOY USED ANYMORE
    00003	//-----------------------------------------------------------
    00004	class FreeHookLink extends Effects;
    00005
    00006	/*
    00007	var int LinkIndex;
    00008	var Hook HStart;
    00009	var HookProjectile HEnd;
    00010	var bool bInitialized;
    00011	const LinkLength = 100.0;
    00012	var vector vEnd, OldvEnd;
    00013	var FreeHookLink NextLink;
    00014	var FreeHookLink PrevLink;
    00015	var float fAddLinkCounter;
    00016
    00017	//_____________________________________________________________________________
    00018	function Tick(float deltatime)
    00019	{
    00020	    local vector vDir, vStart, X,Y,Z;
    00021
    00022	    GetAxes(Pawn(HStart.Owner).Rotation, X, Y, Z);
    00023
    00024	    // If LinkIndex == 0 else get vEnd from prev link.
    00025	    if ( LinkIndex == 0 )
    00026	      vStart = HStart.Owner.Location + X*10 + Z*20 - Y*8;
    00027	    else
    00028	    {
    00029	      vStart = PrevLink.vEnd;
    00030	      if ( !FastTrace(OldvEnd, vStart) && bInitialized )
    00031	      {
    00032	        PrevLink.NextLink = none;
    00033	        Destroy();
    00034	      }
    00035	    }
    00036
    00037	    if ( bInitialized )
    00038	    {
    00039	      if (LinkIndex == 0)
    00040	        vEnd = ( (vStart - vect(0,0,1)*LinkLength) + 2.0*(vStart - normal(HEnd.Location-vStart)*LinkLength) )/3.0 + OldvEnd * 5;
    00041	      else
    00042	        vEnd = ( (vStart - vect(0,0,1)*LinkLength) + 2.0*(vStart - normal(PrevLink.Location-vStart)*LinkLength) )/3.0 + OldvEnd * 5;
    00043	      vEnd /= 6;
    00044	      OldvEnd = vEnd;
    00045	    }
    00046	    else
    00047	    {
    00048	      vEnd = vStart - vect(0,0,1)*LinkLength;
    00049	      OldvEnd = vEnd;
    00050	      bInitialized=true;
    00051	    }
    00052
    00053	    vDir = vEnd - vStart;
    00054	    vEnd = vStart + normal(vDir) * LinkLength * DrawScale3D.X;
    00055
    00056	    SetRotation( rotator(vDir) );
    00057	    SetLocation( vStart + normal(vDir) * LinkLength * 0.5 * DrawScale3D.X);
    00058
    00059	    if ( DeltaTime < 1.0/25.0 )
    00060	    {
    00061	      fAddLinkCounter += DeltaTime;
    00062	      if ( (LinkIndex < 40) && (NextLink == none) && (fAddLinkCounter >= 1.0) )
    00063	      {
    00064	        if ( FastTrace(vEnd - vect(0,0,2)*LinkLength * DrawScale3D.X, vEnd) )
    00065	        {
    00066	          NextLink = Spawn(class'FreeHookLink',,,Location, rotation);
    00067	          NextLink.HStart = HStart;
    00068	          NextLink.LinkIndex = LinkIndex + 1;
    00069	          NextLink.PrevLink = self;
    00070	        }
    00071	      }
    00072	      if ( fAddLinkCounter >= 1.0 )
    00073	        fAddLinkCounter -= 1.0;
    00074	    }
    00075	    else
    00076	    {
    00077	      if ( (LinkIndex > 0) && (NextLink == none) )
    00078	      {
    00079	        PrevLink.NextLink = none;
    00080	        Destroy();
    00081	      }
    00082	    }
    00083	}
    00084
    00085	//_____________________________________________________________________________
    00086	event Destroyed()
    00087	{
    00088	  if (NextLink != none)
    00089	    NextLink.Destroy();
    00090	}
    00091	*/
    00092
    00093	/*
    00094	     Physics=PHYS_None
    00095	     RemoteRole=ROLE_SimulatedProxy
    00096	     DrawType=DT_StaticMesh
    00097	     StaticMesh=StaticMesh'MeshArmesPickup.GrappinCorde'
    00098	     DrawScale3D=(X=0.5,Y=1.0,Z=1.0)
    00099	*/
    00100
    00101
    00102	defaultproperties
    00103	{
    00104	}

End Source Code