Advertisement
Glurmo

ActionCanChangeLevel

Apr 14th, 2017
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ShockPlayer
  2. function bool IsCriticalLogPlaying()
  3. {
  4.     // Returns true if a radio message is playing
  5. }
  6.  
  7. // ShockPlayerController
  8. function bool IsLevelSwitchingEnabled()
  9. {
  10.     return !LevelSwitchingDisabled && !ShockPlayer(Pawn).IsCriticalLogPlaying();
  11. }
  12.  
  13. // ActionCanChangeLevel
  14. function @NULL execute()
  15. {
  16.     local protected bool CanChangeLevelsNow;
  17.     CanChangeLevelsNow = ShockPlayerController(parentScript.Level.GetLocalPlayerController()).IsLevelSwitchingEnabled();
  18.     return newTemporaryVariable(class'VariableBool', string(CanChangeLevelsNow));
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement