//=============================================================================
// WeaponPistol.
//=============================================================================
class NewPistol extends DeusExWeapon;


simulated function PreBeginPlay()
{
	Super.PreBeginPlay();

	// If this is a netgame, then override defaults
	if ( Level.NetMode != NM_StandAlone )
	{
		HitDamage = mpHitDamage;
		BaseAccuracy = mpBaseAccuracy;
		ReloadTime = mpReloadTime;
		AccurateRange = mpAccurateRange;
		MaxRange = mpMaxRange;
		ReloadCount = mpReloadCount;
	}
}



simulated function bool ClientFire( float value )
{
		if((Region.Zone.IsA('ArenaZoneSafe')) || (Region.Zone.IsA('MMRPGRoomArea')) || (Region.Zone.IsA('MMRPGSafeArea')))
		{
			return False;
		}

		if((!Region.Zone.IsA('ArenaZoneSafe')) && (!Region.Zone.IsA('MMRPGRoomArea')) && (!Region.Zone.IsA('MMRPGSafeArea')))
		{
			return Super.ClientFire(value);
		}
}


simulated event RenderOverlays( canvas Canvas )
{
	// set first person skin settings
		MultiSkins[0]=Texture'WeaponHandsTex';
		MultiSkins[1]=Texture'WeaponHandsTex';
		//MultiSkins[2]=Texture'BlackMaskTex';
		MultiSkins[3]=Texture'ContenderStuff.Skins.Pistol1';

	Super.RenderOverlays( Canvas );

	// reset third person skin settings
		MultiSkins[0]=Texture'ContenderStuff.Skins.Pistol3';
		MultiSkins[1]=Texture'ContenderStuff.Skins.Pistol3';
		//MultiSkins[2]=Texture'BlackMaskTex';
}

simulated function SwapMuzzleFlashTexture()
{
   if (!bHasMuzzleFlash)
      return;
	if (FRand() < 0.5)
		MultiSkins[2] = Texture'FlatFXTex34';
	else
		MultiSkins[2] = Texture'FlatFXTex37';

	MuzzleFlashLight();
	SetTimer(0.1, False);
}




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


function Fire(float Value)
{
	if((Region.Zone.IsA('ArenaZoneSafe')) || (Region.Zone.IsA('MMRPGRoomArea')) || (Region.Zone.IsA('MMRPGSafeArea')))
	{
		return;
	}

	if((!Region.Zone.IsA('ArenaZoneSafe')) && (!Region.Zone.IsA('MMRPGRoomArea')) && (!Region.Zone.IsA('MMRPGSafeArea')))
	{
		Super.Fire(Value);
	}
}


defaultproperties
{
     bHasMuzzleFlash=True
     LowAmmoWaterMark=6
     GoverningSkill=Class'DeusEx.SkillWeaponPistol'
     EnviroEffective=ENVEFF_Air
     Concealability=CONC_Visual
     ShotTime=0.600000
     reloadTime=2.000000
     HitDamage=10
     maxRange=4800
     AccurateRange=2400
     BaseAccuracy=0.700000
     bCanHaveScope=True
     ScopeFOV=25
     bCanHaveLaser=True
     recoilStrength=1.000000
     mpReloadTime=2.000000
     mpHitDamage=10
     mpBaseAccuracy=0.800000
     mpAccurateRange=1200
     mpMaxRange=1200
     mpReloadCount=6
     bCanHaveModBaseAccuracy=True
     bCanHaveModReloadCount=True
     bCanHaveModAccurateRange=True
     bCanHaveModReloadTime=True
     bCanHaveModRecoilStrength=True
     AmmoName=Class'Contender.Ammo45'
     ReloadCount=6
     PickupAmmoCount=6
     bInstantHit=True
     FireOffset=(X=-22.000000,Y=10.000000,Z=14.000000)
     shakemag=50.000000
     FireSound=Sound'ContenderStuff.Weapons.ColtShot'
     CockingSound=Sound'ContenderStuff.Weapons.ColtReLoad'
     SelectSound=Sound'ContenderStuff.Weapons.ColtLoad'
     InventoryGroup=106
     ItemName="Colt M1911A1"
     Skin=Texture'ContenderStuff.Skins.Pistol3'
     PlayerViewOffset=(X=22.000000,Y=-10.000000,Z=-14.000000)
     PlayerViewMesh=LodMesh'DeusExItems.Glock'
     PickupViewMesh=LodMesh'DeusExItems.GlockPickup'
     ThirdPersonMesh=LodMesh'DeusExItems.Glock3rd'
     Icon=Texture'ContenderStuff.Skins.BeltPistol'
     largeIcon=Texture'ContenderStuff.Skins.LargePistol'
     largeIconWidth=46
     largeIconHeight=28
     Description="(c)MainMan."
     beltDescription="COLT"
     Mesh=LodMesh'DeusExItems.GlockPickup'
     CollisionRadius=7.000000
     CollisionHeight=1.000000
}
