- Code: Select all
//=============================================================================
// Gatling.
//=============================================================================
class WGatling 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;
}
}
state NormalFire //(Thanks to JimBowen for this Infinite ammo code)
{
Begin:
if ((ClipCount >= ReloadCount) && (ReloadCount != 0))
{
if (!bAutomatic)
{
bFiring = False;
FinishAnim();
}
if (Owner != None)
{
if (Owner.IsA('DeusExPlayer'))
{
bFiring = False;
}
else if (Owner.IsA('ScriptedPawn'))
{
bFiring = False;
ReloadAmmo();
}
}
else
{
if (bHasMuzzleFlash)
EraseMuzzleFlashTexture();
GotoState('Idle');
}
}
if ( bAutomatic && (( Level.NetMode == NM_DedicatedServer ) || ((Level.NetMode == NM_ListenServer) && Owner.IsA('DeusExPlayer') && !DeusExPlayer(Owner).PlayerIsListenClient())))
GotoState('Idle');
Sleep(GetShotTime());
if (bAutomatic)
{
GenerateBullet(); // In multiplayer bullets are generated by the client which will let the server know when
Goto('Begin');
}
bFiring = False;
FinishAnim();
/* // if ReloadCount is 0 and we're not hand to hand, then this is a
// single-use weapon so destroy it after firing once
if ((ReloadCount == 0) && !bHandToHand)
{
if (DeusExPlayer(Owner) != None)
DeusExPlayer(Owner).RemoveItemFromSlot(Self); // remove it from the inventory grid
Destroy();
}
*/ // Do I REALLY need all that crap JUST for infinite ammo?
ReadyToFire();
Done:
bFiring = False;
Finish();
}
defaultproperties
{
GoverningSkill=Class'DeusEx.SkillWeaponHeavy'
EnviroEffective=ENVEFF_Air
Concealability=CONC_All
ShotTime=0.100000
bCanHaveLaser=True
recoilStrength=0.30000
MinWeaponAcc=0.200000
Reloadtime=0.000000
mpReloadTime=0.000000
HitDamage=12
mpHitDamage=12
BaseAccuracy=0.000000
mpBaseAccuracy=0.000000
AccurateRange=99999
mpAccurateRange=99999
MaxRange=99999
mpMaxRange=99999
bHasMuzzleFlash=True
bInstantHit=True
bAltInstantHit=True
bAutomatic=True
RefireRate=0.330000
ReloadCount=0
PickupAmmoCount=1000
AmmoName=Class'DeusEx.AmmoPlasma'
FireOffset=(X=-16.000000,Y=5.000000,Z=11.500000)
shakemag=50.00000
FireSound=Sound'DeusExSounds.Weapons.AssaultGunFire'
AltFireSound=Sound'DeusExSounds.Weapons.AssaultGunReloadEnd'
CockingSound=Sound'DeusExSounds.Weapons.AssaultGunReload'
SelectSound=Sound'DeusExSounds.Weapons.AssaultGunSelect'
InventoryGroup=206
ItemName="|cCD6839Gatling Gun"
PlayerViewOffset=(X=46.000000,Y=-22.000000,Z=-30.000000)
PlayerViewMesh=LodMesh'DeusExDeco.AutoTurretGun'
PickupViewMesh=LodMesh'DeusExDeco.AutoTurretGun'
ThirdPersonMesh=LodMesh'DeusExDeco.AutoTurretGun'
LandSound=Sound'DeusExSounds.Generic.DropLargeWeapon'
Icon=Texture'Engine.S_Corpse'
largeIcon=Texture'Engine.S_Corpse'
largeIconWidth=94
largeIconHeight=65
invSlotsX=2
invSlotsY=2
Description="A #@$%ing turret."
beltDescription="GATLING"
Mesh=LodMesh'DeusExDeco.AutoTurretGun'
DrawScale=0.300000
MultiSkins(0)=Texture'VM001.Skins.Gatling1'
CollisionRadius=22.500000
CollisionHeight=9.100000
Mass=30.000000
}
I'm pretty sure it has something to do with the infinite ammo code, but not sure what.