//=============================================================================
// TeleportProj.
//=============================================================================
class TeleportProj expands Projectile;

#exec MESH IMPORT MESH=TeleportProj ANIVFILE=MODELS\tele_a.3D DATAFILE=MODELS\tele_d.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=TeleportProj X=0 Y=0 Z=0 YAW=64 PITCH=64
#exec MESH SEQUENCE MESH=TeleportProj SEQ=All  STARTFRAME=0  NUMFRAMES=1
//#exec TEXTURE IMPORT NAME=Ahand1 FILE=MODELS\hand.PCX
#exec MESHMAP SCALE MESHMAP=TeleportProj X=0.03 Y=0.03 Z=0.06
#exec MESHMAP SETTEXTURE MESHMAP=TeleportProj NUM=1 TEXTURE=Default

var Rotation ProjRot;

auto state Flying
{
	singular function Touch(Actor Other)
	{
		if (Pawn(Other)!=None && Pawn(Other).bIsPlayer){
			
		}
	}
	
	
	function HitWall (vector HitNormal, actor Wall)
	{

		Velocity = 0.8*(( Velocity dot HitNormal ) * HitNormal * (-2.0) + Velocity);   // Reflect off Wall w/damping
		If (Size(Velocity) < 20) 
		{
			bBounce = False;
			SetPhysics(PHYS_None);
		}
	}
	
	
	function Timer()
	{
		bHidden=False;
	}
	
Begin:
	ProjRot = Rotation;
	ProjRot.Roll -= 7000;
	SetRotation(ProjRot);
	Velocity = Owner.Velocity + Vector(Rotation) * Speed;
	Velocity.z += 200;
	RotationRate.Yaw =  15000;
	RotationRate.Pitch =  15000;
	RotationRate.Roll =  15000;	
	DesiredRotation = Rotation(vect(0,0,1));
	SetTimer(0.1,False);
	bHidden=True;
}

