//=============================================================================
// Sodacan.
//=============================================================================
class DronePickup extends DeusExWeapon;

var bool bAiming;
var int onetime;

simulated function TweenDown()
{
}
function TweenSelect()
{
}
function PlaySelect()
{	
}
function PlayPostSelect()
{
}
function PlayIdleAnim()
{
}


Function ScopeOff()
{
	local _MMRPGPlayer player;

	player = _MMRPGPlayer(Owner);
	bAiming = False;
	Super.ScopeOff();
}

Function ScopeOn()
{
	local _MMRPGPlayer player;
		
	player = _MMRPGPlayer(Owner);
	bAiming = True;
	Super.ScopeOn();
}

Function Tick(float J)
{
	local Vector StartTrace, EndTrace, HitLocation, HitNormal;
	local Actor HitActor;

	Super.Tick(J);

	if( (bAiming) && (Owner != None) )
	{
		if(_MMRPGPlayer(Owner).SpyMission == 2)
		{
			StartTrace = Owner.Location;
			EndTrace = StartTrace + Vector(Pawn(Owner).ViewRotation) * 4096;

			StartTrace.Z += Pawn(Owner).BaseEyeHeight;
			EndTrace.Z += Pawn(Owner).BaseEyeHeight;

			HitActor = Trace(HitLocation, HitNormal, EndTrace, StartTrace);

			if(HitActor != None)
			{
			if(Mover(HitActor) != None)
			{
			if(Mover(HitActor).Tag == 'LagSpy')
			{
				if(onetime < 1 )
				{
					onetime = 1;
				}

				if(onetime > 0)
				{
					onetime += 1;

					if(onetime == 2)
					{
						_MMRPGPlayer(Owner).ReceiveMessage("|p1What is your |p2*NO SIGNAL*|p1 the situation so far?");
					}
					if(onetime == 50)
					{
						_MMRPGPlayer(Owner).ReceiveMessage("|p1I |p2*NO SIGNAL*|p1 we need to involve Agent X |p2*NO SIGNAL*|p1");
					}
					if(onetime == 100)
					{
						_MMRPGPlayer(Owner).ReceiveMessage("|p2*NO SIGNAL*|p1 Yes, |p2*NO SIGNAL*|p1 he also needs to be terminated.");
					}
					if(onetime > 150)
					{
						_MMRPGPlayer(Owner).SpyMission = 3;
						Pawn(Owner).ClientMessage("Goal Completed");
						Pawn(Owner).ClientMessage("Goal Received (Press F2 for details)");
						onetime = 0;
					}
				}
				return;

			}
			}
			}
			onetime = 0;
		}
	}
}


simulated function bool TestMPBeltSpot(int BeltSpot)
{
   return ( (BeltSpot >= 1) && (BeltSpot <=9) );
}


defaultproperties
{
     Reloadcount=0
     bHandtoHand=True
     bHasScope=True
     HitDamage=0
     maxRange=5000
     AccurateRange=5000
     BaseAccuracy=0.100000
     mpHitDamage=0
     mpBaseAccuracy=0.100000
     mpAccurateRange=5000
     mpMaxRange=5000
     PickupAmmoCount=0
     InventoryGroup=238
     ItemName="Binoculars With Remote Mic."
     ItemArticle="some"
     PlayerViewOffset=(X=18.000000,Z=-6.000000)
     PlayerViewMesh=LodMesh'DeusExItems.Binoculars'
     PickupViewMesh=LodMesh'DeusExItems.Binoculars'
     ThirdPersonMesh=LodMesh'DeusExItems.Binoculars'
     Icon=Texture'DeusExUI.Icons.BeltIconBinoculars'
     largeIcon=Texture'DeusExUI.Icons.LargeIconBinoculars'
     largeIconWidth=47
     largeIconHeight=37
     Description="."
     beltDescription="BINOCS"
     Mesh=LodMesh'DeusExItems.Binoculars'
     CollisionRadius=7.000000
     CollisionHeight=2.140000
}
