I've been modifying various .uc files in order to accomplish some of the weapon coding. However, I am having some trouble with modifying values related to shot penetration and reskinning in the .uc files as well as recompiling them into a .u file for useage.
Using Eliot van Uytfanghe G36 as a base, I couldn't find a proper way to add penetration to the weapon while snooping around the fire.uc
- Code: Select all
class G36CFire extends KFFire;
simulated function bool AllowFire()
{
// End:0x19
if(FluXiWeapon(Weapon).bIsToggling)
{
return false;
}
// End:0x32
if(KFWeapon(Weapon).bIsReloading)
{
return false;
}
// End:0x4D
if(KFPawn(Instigator).SecondaryItem != none)
{
return false;
}
// End:0x66
if(KFPawn(Instigator).bThrowingNade)
{
return false;
}
// End:0xE1
if(KFWeapon(Weapon).MagAmmoRemaining < 1)
{
// End:0xB2
if((Level.TimeSeconds - LastClickTime) > FireRate)
{
LastClickTime = Level.TimeSeconds;
}
// End:0xDF
if(AIController(Instigator.Controller) != none)
{
KFWeapon(Weapon).ReloadMeNow();
}
return false;
}
return super(WeaponFire).AllowFire();
//return;
}
simulated function float GetSpread()
{
local float NewSpread, AccuracyMod;
AccuracyMod = 1.0;
// End:0x29
if(KFWeap.bAimingRifle)
{
AccuracyMod *= 0.50;
}
// End:0x54
if((Instigator != none) && Instigator.bIsCrouched)
{
AccuracyMod *= 0.850;
}
// End:0x69
if(bWaitForRelease)
{
AccuracyMod *= 0.850;
}
NumShotsInBurst += 1;
// End:0xA5
if((Level.TimeSeconds - LastFireTime) > 0.50)
{
NewSpread = default.Spread;
NumShotsInBurst = 0;
}
// End:0xCE
else
{
NewSpread = FMin(default.Spread + (float(NumShotsInBurst) * (MaxSpread / 6.0)), MaxSpread);
}
NewSpread *= AccuracyMod;
return NewSpread;
//return;
}
defaultproperties
{
FireAimedAnim=Fire_Iron
RecoilRate=0.070
maxVerticalRecoilAngle=500
maxHorizontalRecoilAngle=250
bRecoilRightOnly=true
ShellEjectClass=Class'ROEffects.KFShellEjectSCAR'
ShellEjectBoneName=Shell_eject
bAccuracyBonusForSemiAuto=true
bRandomPitchFireSound=false
FireSoundRef="FX-G36C_v2_Snd.Fire_ST"
StereoFireSoundRef="FX-G36C_v2_Snd.Fire"
NoAmmoSoundRef="FX-G36C_v2_Snd.DryFire"
DamageType=class'DamTypeG36CAssaultRifle'
DamageMin=30
DamageMax=35
Momentum=8500.0
bPawnRapidFireAnim=true
TransientSoundVolume=3.0
TransientSoundRadius=250.0
FireLoopAnim=Fire
TweenTime=0.0250
FireForce="AssaultRifleFire"
FireRate=0.110
AmmoClass=class'G36CAmmo'
AmmoPerFire=1
ShakeRotMag=(X=50.0,Y=50.0,Z=350.0)
ShakeRotRate=(X=5000.0,Y=5000.0,Z=5000.0)
ShakeRotTime=0.750
ShakeOffsetMag=(X=6.0,Y=3.0,Z=7.50)
ShakeOffsetRate=(X=1000.0,Y=1000.0,Z=1000.0)
ShakeOffsetTime=1.250
BotRefireRate=0.990
FlashEmitterClass=Class'ROEffects.MuzzleFlash1stSTG'
aimerror=42.0
Spread=0.00750
SpreadStyle=1
}
Which value corresponds to penetration and allowed # of penetrations? I already know the default damage penalty for penetration is a 50% damage redux.
EDIT: I already modified the damage values