Advertisement
Treedestroyed

WaveMax

Dec 19th, 2020
2,507
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class WaveMaxMut extends KFMutator;
  2.  
  3. function InitMutator( string Options, out string ErrorMessage )
  4. {
  5.     super.InitMutator( Options, ErrorMessage );
  6.    
  7.     if ( MyKFGI != None && MyKFGI.GameLength == GL_Long )
  8.     {
  9.         MyKFGI.WaveMax = 12;
  10.        
  11.         if ( MyKFGI.MyKFGRI != None )
  12.         {
  13.             MyKFGI.MyKFGRI.WaveMax = 255;
  14.         }
  15.     }
  16.    
  17.     `log("WaveMax mutator initialized");
  18. }
  19.  
  20. simulated event PostBeginPlay()
  21. {
  22.     super.PostBeginPlay();
  23.    
  24.     if ( WorldInfo.Game.BaseMutator == None )
  25.         WorldInfo.Game.BaseMutator = Self;
  26.     else WorldInfo.Game.BaseMutator.AddMutator( Self );
  27. }
  28.  
  29. function AddMutator( Mutator M )
  30. {
  31.     if ( M != Self )
  32.     {
  33.         if ( M.Class == Class )
  34.             M.Destroy();
  35.         else super.AddMutator( M );
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement