class APPawnActions extends Info;

function EditPawn(Pawn p, string param)
{
  if(p == none || p.controller == none)
  {
    return;
  }

  // force walking before any other action
  p.bAmbientCreature = false;
  p.UnderWaterTime = p.Default.UnderWaterTime;
  p.SetCollision(true, true , true);
  p.SetPhysics(PHYS_Walking);
  p.bCollideWorld = true;
  p.JumpZ = p.Default.JumpZ;
  p.bCanJump = true;
  p.controller.GotoState('PlayerWalking');
  p.PlayTeleportEffect(true, true);

  switch(param)
  {
    case "ghost":
      p.bAmbientCreature = true;
      p.UnderWaterTime = -1.0;
      p.SetCollision(false, false, false);
      p.bCollideWorld = false;
      p.controller.GotoState('PlayerFlying');
      p.PlayTeleportEffect(true, true);
      break;
    case "fly":
      p.bAmbientcreature = false;
      p.UnderWaterTime = p.Default.UnderWaterTime;
      p.Setcollision(true, true , true);
      p.bCollideWorld = true;
      p.controller.GotoState('PlayerFlying');
      p.PlayTeleportEffect(true, true);
      break;
    case "spider":
      p.bAmbientCreature = false;
      p.UnderWaterTime = p.Default.UnderWaterTime;
      p.SetCollision(true, true , true);
      p.bCollideWorld = true;
      p.JumpZ = 0.0;
      xPawn(p).bflaming = true;
      p.controller.GotoState('PlayerSpidering');
      p.PlayTeleportEffect(true, true);
      break;
  }
}