Guest User

Untitled

a guest
Oct 3rd, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //WarGameInfo.uc
  2.  
  3. class WarGameInfo extends UTDeathmatch;
  4.  
  5. defaultproperties
  6. {
  7.     PlayerControllerClass=class'WarGamePlayerController'
  8.     DefaultPawnClass=class'WarGamePawn'
  9.  
  10.     Name="Default__MyGameInfo"
  11. }
  12.  
  13. //WarGamePlayerController.uc
  14.  
  15. class WarGamePlayerController extends UTPlayerController;
  16.    
  17. event Possess(Pawn inPawn, bool bVehicleTransition)
  18. {
  19.     Super.Possess(inPawn, bVehicleTransition);
  20.     SetBehindView(true);   
  21. }
  22.  
  23. defaultproperties
  24. {
  25.     Name="Default__WarGamePlayerController"
  26. }
  27.  
  28. //WarGamePawn.uc
  29.  
  30. class WarGamePawn extends UTPawn;
  31.    
  32. simulated function bool CalcCamera(float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV)
  33. {
  34.     local vector start, end, hl, hn;
  35.     local actor a;
  36.    
  37.     start = Location;
  38.    
  39.     if (Controller != none)
  40.     {
  41.         end = Location - Vector(Controller.Rotation) * 192.f;
  42.     }
  43.     else
  44.     {
  45.         end = Location - Vector(Rotation) * 192.f;
  46.     }
  47.    
  48.     a = Trace(hl, hn, end, start, false);
  49.    
  50.     if (a != none)
  51.     {
  52.         out_CamLoc = hl;
  53.     }
  54.     else
  55.     {
  56.         out_CamLoc = end;
  57.     }
  58.    
  59.     out_CamRot = Rotator(Location - out_CamLoc);
  60.     return true;
  61. }
  62.  
  63. defaultproperties
  64. {
  65.     Begin Object Name=WPawnSkeletalMeshComponent
  66.         bOwnerNoSee=false
  67.     End Object
  68.     Name="Default__WarGamePawn"
  69. }
Add Comment
Please, Sign In to add comment