Hello! The primary purpose of this patch is to migrate the aircraft guns/bullets to the new system used by the vehicles. This brings the optimizations and robustness from the vehicle weapons to the aircraft. For the most part this is a back end change, but in updating the code it has resulted in a lot of tangential features being updated. [h2]ZSU-57-2[/h2] [img]https://clan.cloudflare.steamstatic.com/images//40742388/b51acda76b657fafa32ccc2665160b4ec1de5de1.gif[/img] This patch brings in a new unit, the ZSU-57-2. This "flak tank" is primarily an area denial weapon. It's not very accurate, and cannot fire under a certain altitude, but if you get hit by a salvo it can be devastating. The ZSU-57-2 can be selected in the Strike Instant Action mode, and has been added to the Arena Demo. [h2]Timed fuzes and flak[/h2] [img]https://clan.cloudflare.steamstatic.com/images//40742388/b289c8d98505195cc7846e5c56914e57a41aab3c.gif[/img] Vehicles can now be configured to fire an explosive round with a timed fuze. The new ZSU-57-2 fires these rounds. Flak rounds are explosive with a high splash damage, but aren't precisely aimed. The flak rounds of the ZSU-57-2 cannot (intentionally) explode below a minimum altitude, so they can be (mostly) safely avoided by flying below the flak screens. Just try not to intercept any of the shells with your plane and you'll be fine. [h2]Turret error[/h2] [img]https://i.imgur.com/fmNnNUs.png[/img] In 0.9.1, following the vehicle rework, all vehicles became perfectly accurate regardless of what their accuracy was set to in the files. This resulted in APCs and machineguns taking more than just pot-shots at passing planes, and anti-aircraft fire being dead on if you didn't jink or change speed. With this turret error back in, only dedicated anti-aircraft weapons are accurate, and even those are no longer perfect unless you get close to them. When taking fire from AAA, you should have a short warning to react to it before the distance is closed to the turret's effective range. This is back to how it was originally intended to work, and can be used to further differentiate different vehicles of the same type. E.g. a newer Shilka can be more accurate than a manually aimed older one. [img]https://i.imgur.com/Ib9ibzp.png[/img] For reference, this is how the system works: [list] [*][b]Leading:[/b] Affects how far ahead or behind the AI can lead a target. Turrets which lack fire control software (e.g. machinegun turrets) will lag behind a moving target. [*][b]Effective Range:[/b] The range at which the turret will fire accurately onto a target. At ranges beyond this, accuracy falls off, and the turret will have some error applied to its targeting solution simulating an inaccurate solution. [*][b]Falloff Range/Error:[/b] At a certain range, the maximum amount of error that can be applied to a target. E.g. if set to 500m error at 1500m, this means that the most the targeting calculation will be off is by 500 meters when the target is 1500m away. [*][b]Min Height:[/b] Used mainly to prevent vehicles from firing into the ground when aiming at aircraft. For most vehicles this is irrelevant, but the ZSU-57-2 uses this to create the "flak floor" effect which prevents it from (purposefully) detonating flak too close to the ground. [/list] [h2]New/Updated visual and sound effects[/h2] [img]https://i.imgur.com/P9wckIH.png[/img] In the process of moving the aircraft to the new and optimized gun code, this was the best time to do the pass on weapon effects I'd been wanting to do for a while. All weapons now have new hit, penetrate, explosion, and ground/water impacts split among three "sizes" of weapons: machinegun, autocannon, and cannon. The sound effects for all of these has been revised as well, so they're more audible and with cleaner audio than before. [img]https://i.imgur.com/rwU64oO.png[/img] Originally written in a couple hours as a "haha wouldn't it be funny if I used instanced meshes to draw empty shells it'd probably be stupid efficient to the point of having no performance impact" joke, it worked so well that I decided to formalize it and add it to the game. The Shilka has been converted to use this effect (it previously achieved it through jankier and less performant means), and ejecting shells have been added to all the aircraft that do it: MiG-21, MiG-23, and F-5E. I also added it to the AV8B's gunpod which is not realistic but it looks so cool I left it in. [h2]Changelog[/h2] [code]New Features: - Many new visual and sound effects for the autocannon and cannon sized weaponry - Added ZSU-57-2 using a new timed fuze to create an area denial flak effect - Guns can use a timed fuze to explode based on a predicted target position - ZSU-57-2 has a "minimum engagement altitude" for turrets creates a "floor" that the player can fly under - Added ridiculous and extremely optimized empty shell system - Shilka, Mig-23, MiG-21, F-5E, and AV8B eject empty shells (I know the GAU-12 doesn't, but it's cool.) Improvements: - Aircraft guns migrated to new bullet/gun system - RecoilForce parameter moved to the gun itself - Vehicles override a gun's burst settings on the turret - Tracers have configurable length (1 for aircraft, 2 for vehicles) - All aircraft guns (even AI) now have bullet drop - AI can compensate correctly for bullet drop - Additional error reporting when something is wrong in the vehicle JSON - Revision of turret error properties + Leading is used to make the turret lag behind the target or apply extra lead + EffectiveRange is the range at which a turret is 100% accurate + FalloffError is the most a turret can be off target when the target is at or beyond FalloffRange + Offsetspeed changed such that higher values result in more errative behavior - Gun metal impact sounds more metalier, explosions more explosioner - Bigger muzzle flash for the Shilka - Tweaked empty shell color - More responsive radar/threat warning display auto ranging - Added 2 and 8 mile ranges for the displays Bugfixes: - Vehicles/turrets no longer target destroyed/disabled vehicles - Fixed gun audio not playing correctly when firing - Aircraft guns won't continue fire sound or pause burst when put into nav mode while firing - Tracers appear correctly from the barrel, even on fast moving jets - More aircraft gun camera shake - Gun fire sound emitted from barrel rather than vehicle/aircraft center - Barrels recoil in the correct direction - Bullets spawn the specified effects on self-destruct/explosion - Fixed crazy issue where sometimes some gun sounds could only be heard if the camera was next to the control tower - Fixed vehicles being unable to target if there were too many vehicles around - Turrets no longer instantly reset to forward when they go idle - Tank muzzle flash smoke no longer turns with the barrel - Muzzle flash smoke now has shading applied correctly - Removed "HasRecoil" parameter, default barrel recoil is now 0 - Removed recoil visual from Shilka (not modelled correctly) - More (EXPERIMENTAL!) safeguards to help vehicles spawn without errors in Arena - Delayed sounds waiting to be played after scene has changed no longer crash - Fixed rare crash caused by bullet exploding the vehicle it was fired from if it impacts on its first frame - NavMeshAgent enabled only after initialization (should reduce log spam and make for cleaner vehicle spawning) - Simplified NavMesh spawning, and it now checks through a wider radius (hopefully reduces errors from spawning...) - Vehicles now avoid disabled/destroyed vehicles in addition to wrecks Balance: - M60 top turret burst delay increased 2 -> 3 - Machineguns have difficulty tracking/leading moving targets - M163/Shilka have "perfect" accuracy only out to 1500m - All AAA in the Arena demo have had their build times increased to 70 seconds[/code]