// September 2015 // Levee Patroller / Dijk Patrouille // This source file is (c) by Deltares. This source file is open source but only available to select users. Do not redistribute without written permission of Stichting Deltares, Delft, The Netherlands. // This header has been automatically generated. class DebugInfoMutator extends Mutator; var bool bAffectSpectators; // If this is set to true, an interaction will be created for spectators var bool bAffectPlayers; // If this is set to true, an interaction will be created for players var bool bHasInteraction; function PreBeginPlay() { Log("ICU Mutator Started"); // Always comment out your logs unless they're errors } simulated function Tick(float DeltaTime) { local PlayerController PC; // If the player has an interaction already, exit function. if (bHasInteraction) Return; PC = Level.GetLocalPlayerController(); // Run a check to see whether this mutator should create an interaction for the player if ( PC != None && ((PC.PlayerReplicationInfo.bIsSpectator && bAffectSpectators) || (bAffectPlayers && !PC.PlayerReplicationInfo.bIsSpectator)) ) { PC.Player.InteractionMaster.AddInteraction("GeoWorld.DebugInfoTips", PC.Player); // Create the interaction bHasInteraction = True; // Set the variable so this lot isn't called again } } DefaultProperties { bAffectSpectators=false bAffectPlayers=true RemoteRole=ROLE_SimulatedProxy bAlwaysRelevant=true }