//=============================================================================
// CowShrine.
//=============================================================================
class CowShrine expands HomeBase;

#exec AUDIO IMPORT FILE="Sounds\Pickups\FFIELDl2.WAV" NAME="ffieldl2" GROUP="Pickups"
#exec AUDIO IMPORT FILE="Sounds\Pickups\FFIELDA3.WAV" NAME="ffielda3" GROUP="Pickups"

#exec MESH IMPORT MESH=ForceField ANIVFILE=MODELS\forcef_a.3D DATAFILE=MODELS\forcef_d.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=ForceField X=0 Y=0 Z=0 YAW=64
#exec MESH SEQUENCE MESH=ForceField SEQ=All STARTFRAME=0  NUMFRAMES=19
#exec MESH SEQUENCE MESH=ForceField SEQ=Grow STARTFRAME=0  NUMFRAMES=10
#exec MESH SEQUENCE MESH=ForceField SEQ=Spin STARTFRAME=10  NUMFRAMES=9
#exec OBJ LOAD FILE=Textures\fireeffect10.utx PACKAGE=UNREALI
#exec MESHMAP SCALE MESHMAP=ForceField X=0.08 Y=0.08 Z=0.16
#exec MESHMAP SETTEXTURE MESHMAP=ForceField NUM=1 TEXTURE=FireEffect10

var() byte Team;

function PreBeginPlay()
{
	CallParent.PreBeginPlay();
	LoopAnim('Spin');
}

// How to determine touches to shrine
event Bump(actor Other)
{
	local SacredCowHead aHead;

	if ( Other.IsA('Pawn') && Pawn(Other).bIsPlayer )
		foreach AllActors( class 'SacredCowHead', aHead )
			if ( aHead.Holder == Other )
			{
				if ( Level.Game.IsA('KilltheCowGame') )
					KilltheCowGame(Level.Game).ScoreOffering(Pawn(Other), aHead, self);
				aHead.Destroy();
			}
}

function SignalScore()
{
	PlaySound(Sound'FFieldA3', SLOT_Misc, 4);
}
		
