Advertisement
Glurmo

Little Sister Warp

Feb 16th, 2017
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // this method is in ShockAI.U as part of the FollowPanicAction class
  2.  
  3. function GetUpdatedDestination(out @NULL outDestinationActor, out @NULL outDestinationLocation)
  4. {
  5.     local protected @NULL DirectionBehindProtector, PositionBehindEscort, Escort;
  6.  
  7.     Escort = GetEscort();
  8.     DirectionBehindProtector = Normal(Escort.Location - AttackPawn.Location);
  9.     PositionBehindEscort = Escort.Location + (DirectionBehindProtector * DesiredDistanceBehindProtector);
  10.     outDestinationLocation = m_Pawn.Location;
  11.     if((m_Pawn.GetAdjustedPoint(PositionBehindEscort) && m_Pawn.GetPointOnFloor(PositionBehindEscort)) && m_Pawn.IsAreaClearOfPawns(PositionBehindEscort, m_Pawn.GetCylinderExtent()))
  12.     {
  13.         outDestinationLocation = PositionBehindEscort;
  14.     }
  15.     return;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement