diff --git a/Redirect/ChaChaComboGibv1a.u.uz2 b/Redirect/ChaChaComboGibv1a.u.uz2 index 3030c34..90f555f 100644 Binary files a/Redirect/ChaChaComboGibv1a.u.uz2 and b/Redirect/ChaChaComboGibv1a.u.uz2 differ diff --git a/Sources/Classes/ChaChaComboShockRifle.uc b/Sources/Classes/ChaChaComboShockRifle.uc index b5f148f..e44ab02 100644 --- a/Sources/Classes/ChaChaComboShockRifle.uc +++ b/Sources/Classes/ChaChaComboShockRifle.uc @@ -26,6 +26,72 @@ simulated event PreBeginPlay() } } +/* BestMode() +=> re apply base method from shockrifle to allow bot use combo +*/ +function byte BestMode() +{ + local float EnemyDist, MaxDist; + local bot B; + + bWaitForCombo = false; + B = Bot(Instigator.Controller); + if ( (B == None) || (B.Enemy == None) ) + return 0; + + if (B.IsShootingObjective()) + return 0; + + if ( !B.EnemyVisible() ) + { + if ( (ComboTarget != None) && !ComboTarget.bDeleteMe && B.CanCombo() ) + { + bWaitForCombo = true; + return 0; + } + ComboTarget = None; + if ( B.CanCombo() && B.ProficientWithWeapon() ) + { + bRegisterTarget = true; + return 1; + } + return 0; + } + + EnemyDist = VSize(B.Enemy.Location - Instigator.Location); + if ( B.Skill > 5 ) + MaxDist = 4 * class'ShockProjectile'.default.Speed; + else + MaxDist = 3 * class'ShockProjectile'.default.Speed; + + if ( (EnemyDist > MaxDist) || (EnemyDist < 150) ) + { + ComboTarget = None; + return 0; + } + + if ( (ComboTarget != None) && !ComboTarget.bDeleteMe && B.CanCombo() ) + { + bWaitForCombo = true; + return 0; + } + + ComboTarget = None; + + if ( (EnemyDist > 2500) && (FRand() < 0.5) ) + return 0; + + if ( B.CanCombo() && B.ProficientWithWeapon() ) + { + bRegisterTarget = true; + return 1; + } + if ( FRand() < 0.7 ) + return 0; + return 1; +} + + defaultproperties { FireModeClass(0)=Class'XWeapons.SuperShockBeamFire' diff --git a/System/ChaChaComboGibv1a.u b/System/ChaChaComboGibv1a.u index fe15a66..ea4fcc7 100644 Binary files a/System/ChaChaComboGibv1a.u and b/System/ChaChaComboGibv1a.u differ