@@ -55,6 +55,7 @@ public List<PlayerManager> TrackedPlayers
55
55
private AmmoBoxCollector ammoBoxCollector ;
56
56
private Coroutine airDisablingRoutine ;
57
57
private bool isJumpCooldown = false ;
58
+ private bool hasInaccurateAugment = false ;
58
59
59
60
private void Start ( )
60
61
{
@@ -150,6 +151,9 @@ public override void SetGun(Transform offset)
150
151
var barrel = ChoosePart ( identity . Barrel , identity . Barrels , StaticInfo . Singleton . StartingBarrel ) ;
151
152
var extension = ChoosePart ( identity . Extension , identity . Extensions , StaticInfo . Singleton . StartingExtension ) ;
152
153
154
+ if ( extension != null )
155
+ hasInaccurateAugment = extension . id == "Rubber" ;
156
+
153
157
var gun = GunFactory . InstantiateGunAI ( body , barrel , extension , this , offset ) ;
154
158
gunController = gun . GetComponent < GunController > ( ) ;
155
159
gunController . Initialize ( ) ;
@@ -220,8 +224,10 @@ private void UpdateAimTarget(GunStats stats)
220
224
{
221
225
if ( ! ShootingTarget )
222
226
return ;
227
+
228
+ var badAimMultiplier = hasInaccurateAugment ? 4f : 1f ;
223
229
gunController . target = ShootingTarget . position
224
- + new Vector3 ( Random . Range ( - 1f , 1f ) , 0 , Random . Range ( - 1f , 1f ) )
230
+ + new Vector3 ( Random . Range ( - 1f , 1f ) * badAimMultiplier , 0 , Random . Range ( - 1f , 1f ) * badAimMultiplier )
225
231
* ( transform . position - ShootingTarget . position ) . magnitude * 0.1f ;
226
232
}
227
233
0 commit comments