//=============================================================================
// CRDM.
//=============================================================================
class CRDM extends Mutator;

simulated function PostBeginPlay()
{
  Level.Game.BaseMutator.AddMutator(Self);
}

function ModifyPlayer(Pawn P)
{
  local CRDA CRDA;
  local DeusExPlayer _Player;
  _Player = DeusExPlayer(P);
  if(_Player != None)
  {
    if(!_FindActor(_Player))
    {
      CRDA = Spawn(Class'CRDA');
      if(CRDA != None)
      {
        CRDA._ValidateConsole(_Player);
      }
    }
  }

  Super.ModifyPlayer(P);
}

function bool _FindActor(DeusExPlayer _Player)
{
  local CRDA CRDA;
  ForEach AllActors(class'CRDA', CRDA)
  {
    if(CRDA != None)
    {
      if(CRDA._Player == _Player)
      {
        return True;
      }
    }
  }
  return False;
}

defaultproperties
{
  bHidden=True
}