From Gustavo6046, 1 Week ago, written in UnrealScript.
Embed
  1. function HateList CheckHate(Pawn InstigatedBy, Pawn Other, optional bool bForwardOnly, optional HateList Precursor)
  2. {
  3.         if ( !bForwardOnly && self != ListTail() && Precursor == None )
  4.                 return ListTail().CheckHate(InstigatedBy, Other, true);
  5.                
  6.         if ( Precursor != None )
  7.                 Log(Precursor@"->"@self@"->"@NextHate);
  8.        
  9.         else
  10.                 Log(self@"->"@NextHate);
  11.                
  12.         if ( InstigatedBy == Owner && Victim == Other )
  13.                 return self;
  14.                
  15.         if ( NextHate == ListHead() )
  16.                 return ListHead().SingleCheck(InstigatedBy, Other);
  17.                
  18.         else Log(NextHate@"!!"@ListHead());
  19.                
  20.         if ( NextHate == None || NextHate.Position <= Position )
  21.                 return None;
  22.                
  23.         else
  24.                 return NextHate.CheckHate(InstigatedBy, Other, true, self);
  25. }
  26.