// adding an override to only send the silent aim raycast if the bullets are at the end of their travel public void OV_ballistics() { Useable PlayerUse = Player.player.equipment.useable; if (Time.realtimeSinceStartup - PlayerLifeUI.hitmarkers[0].lastHit > PlayerUI.HIT_TIME) { PlayerLifeUI.hitmarkers[0].hitBuildImage.isVisible = false; PlayerLifeUI.hitmarkers[0].hitCriticalImage.isVisible = false; PlayerLifeUI.hitmarkers[0].hitEntitiyImage.isVisible = false; } ItemGunAsset PAsset = (ItemGunAsset)Player.player.equipment.asset; PlayerLook Look = Player.player.look; if (PAsset.projectile != null) { return; } List <BulletInfo> Bullets = (List <BulletInfo>)BulletsField.GetValue(PlayerUse); if (Bullets.Count == 0) { return; } Transform t = (Player.player.look.perspective == EPlayerPerspective.FIRST ? Player.player.look.aim : G.MainCamera.transform); RaycastInfo ri = hkDamageTool.SetupRaycast(new Ray(t.position, t.forward), T.GetGunDistance().Value, RayMasks.DAMAGE_CLIENT); if (Provider.modeConfigData.Gameplay.Ballistics) { for (int i = 0; i < Bullets.Count; i++) { BulletInfo bulletInfo = Bullets[i]; double distance = Vector3.Distance(Player.player.transform.position, ri.point); if (bulletInfo.steps * PAsset.ballisticTravel < distance) { continue; } EPlayerHit eplayerhit = CalcHitMarker(PAsset, ref ri); PlayerUI.hitmark(0, Vector3.zero, false, eplayerhit); Player.player.input.sendRaycast(ri); Weapons.AddTracer(ri); Weapons.AddDamage(ri); bulletInfo.steps = 254; } for (int k = Bullets.Count - 1; k >= 0; k--) { BulletInfo bulletInfo = Bullets[k]; bulletInfo.steps += 1; if (bulletInfo.steps >= PAsset.ballisticSteps) { Bullets.RemoveAt(k); } } } else { for (int i = 0; i < Bullets.Count; i++) { EPlayerHit eplayerhit = CalcHitMarker(PAsset, ref ri); PlayerUI.hitmark(0, Vector3.zero, false, eplayerhit); Player.player.input.sendRaycast(ri); Weapons.AddTracer(ri); Weapons.AddDamage(ri); } Bullets.Clear(); } return; }