daily pastebin goal
66%
SHARE
TWEET

zedtime

a guest Apr 29th, 2015 1,178 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function DramaticEvent(float ZedTimeChance, optional float Duration)
  2. {
  3.     local float TimeSinceLastEvent;
  4.     local KFPlayerController KFPC;
  5.  
  6.     Duration = 3.0;
  7.     TimeSinceLastEvent = WorldInfo.TimeSeconds - LastZedTimeEvent;
  8.     // End:0x66
  9.     if((TimeSinceLastEvent < 10.0) && ZedTimeChance < 1.0)
  10.     {
  11.         return;
  12.     }
  13.     // End:0x8B
  14.     if(TimeSinceLastEvent > float(60))
  15.     {
  16.         ZedTimeChance *= 4.0;
  17.     }
  18.     // End:0xAD
  19.     else
  20.     {
  21.         // End:0xAD
  22.         if(TimeSinceLastEvent > float(30))
  23.         {
  24.             ZedTimeChance *= 2.0;
  25.         }
  26.     }
  27.     // End:0x190
  28.     if((FRand() <= ZedTimeChance) && Duration > ZedTimeRemaining)
  29.     {
  30.         ZedTimeRemaining = Duration;
  31.         bZedTimeBlendingOut = false;
  32.         LastZedTimeEvent = WorldInfo.TimeSeconds;
  33.         SetZedTimeDilation(0.20);
  34.         // End:0x18F
  35.         foreach WorldInfo.AllControllers(class'KFPlayerController', KFPC)
  36.         {
  37.             // End:0x18E
  38.             if(KFPC != none)
  39.             {
  40.                 KFPC.EnterZedTime();
  41.             }            
  42.         }        
  43.     }
  44.     //return;    
  45. }
  46.  
  47. //-------------------------------------------------------------------------
  48.  
  49.  
  50. function CheckZedTimeOnKill(Controller Killer, Controller KilledPlayer, Pawn KilledPawn, class<DamageType> DamageType)
  51. {
  52.     local bool bIsHuman;
  53.     local KFPlayerController KFPC;
  54.     local KFPerk KillersPerk;
  55.     local class<KFDamageType> KFDT;
  56.  
  57.     KFDT = class<KFDamageType>(DamageType);
  58.     // End:0x58
  59.     if((KFDT != none) && KFDT.default.DoT_Type != 0)
  60.     {
  61.         return;
  62.     }
  63.     // End:0x14B
  64.     if(IsZedTimeActive())
  65.     {
  66.         KFPC = KFPlayerController(Killer);
  67.         // End:0x148
  68.         if(KFPC != none)
  69.         {
  70.             KillersPerk = KFPC.GetPerk();
  71.             // End:0x148
  72.             if(((ZedTimeRemaining > 0.0) && KillersPerk != none) && KillersPerk.GetZedTimeExtension(KFPC.GetLevel()) > float(ZedTimeExtensionsUsed))
  73.             {
  74.                 DramaticEvent(1.0);
  75.                 ++ ZedTimeExtensionsUsed;
  76.             }
  77.         }
  78.     }
  79.     // End:0x276
  80.     else
  81.     {
  82.         bIsHuman = KilledPawn.IsA('KFPawn_Human');
  83.         // End:0x195
  84.         if(bIsHuman)
  85.         {
  86.             DramaticEvent(0.050);
  87.             return;
  88.         }
  89.         // End:0x1BB
  90.         if(KilledPawn.Controller == none)
  91.         {
  92.             return;
  93.         }
  94.         // End:0x266
  95.         if(((Killer != none) && Killer.Pawn != none) && VSizeSq(Killer.Pawn.Location - KilledPawn.Location) < float(90000))
  96.         {
  97.             DramaticEvent(0.050);
  98.         }
  99.         // End:0x276
  100.         else
  101.         {
  102.             DramaticEvent(0.0250);
  103.         }
  104.     }
  105.     //return;    
  106. }
  107.  
  108. function NotifyHeadshotKill(Controller Killer, Pawn KilledPawn)
  109. {
  110.     // End:0xAB
  111.     if(((Killer != none) && Killer.Pawn != none) && VSizeSq(Killer.Pawn.Location - KilledPawn.Location) > Square(2500.0))
  112.     {
  113.         DramaticEvent(0.050);
  114.     }
  115.     // End:0xBB
  116.     else
  117.     {
  118.         DramaticEvent(0.030);
  119.     }
  120.     //return;    
  121. }
  122.  
  123. //-------------------------------------------------------------------------
  124.  
  125. protected simulated function bool DoExplosionDamage(bool bCauseDamage, bool bCauseEffects)
  126. {
  127.     local bool bReturn;
  128.  
  129.     NumPawnsKilled = 0;
  130.     bReturn = super.DoExplosionDamage(bCauseDamage, bCauseEffects);
  131.     // End:0x129
  132.     if((Role == ROLE_Authority) && KFGameInfo(WorldInfo.Game) != none)
  133.     {
  134.         // End:0xD2
  135.         if(NumPawnsKilled >= 4)
  136.         {
  137.             KFGameInfo(WorldInfo.Game).DramaticEvent(0.050);
  138.         }
  139.         // End:0x129
  140.         else
  141.         {
  142.             // End:0x129
  143.             if(NumPawnsKilled >= 2)
  144.             {
  145.                 KFGameInfo(WorldInfo.Game).DramaticEvent(0.030);
  146.             }
  147.         }
  148.     }
  149.     return bReturn;
  150.     //return ReturnValue;    
  151. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top