//=============================================================================
// BANPushField.
//=============================================================================
class BANPushField expands MyLittleBANPushField;

/* Compatiblity class.
 *
 * For new cases: use parent class.
 *
 * Caveat: run-time changes to variables are not propagated to their
 *         parent equivalents. Remedy: replace with instance of parent
 *         class.
 *
 *          --zeurkous.
 */

var() bool FieldEffectOn;         // Set to true to make field active
var() bool FieldConstantStrength; // If true ..., otherwise inversly proportional to distance
var() bool FieldDirectional;	  // If true, uses th eobejct's direction for the field
var() bool WhenOffAlwaysOff;	  // If true, can't be turned back on

event BeginPlay()
{
 bFieldConstantStrength = FieldConstantStrength;
 bFieldDirectional      = FieldDirectional;

 if(FieldEffectOn) InitialState = 'Enabled';
 else              InitialState = 'Disabled';
}

event Trigger(Actor Other, Pawn Instigator)
{
      if(FieldEffectOn)    
  { FieldEffectOn = false; GoToState('Disabled'); }
 else if(!WhenOffAlwaysOff)
  { FieldEffectOn = true;  GoToState('Enabled');  }
}

event UnTrigger(Actor Other, Pawn Instigator)
{ Trigger(Other, Instigator); }

defaultproperties
{
 FieldEffectOn=True

/* Because of a stupid UnrealEd bug, Leo_TCK made me comment the
   following line out. --zeur. */

// FieldConstantStrength=False

 FieldDirectional=True
 WhenOffAlwaysOff=True
}