Fix yellow particle warning when Assaults spam the Inferno-X Cannon - #50
Open
abielsaf wants to merge 1 commit into
Open
Fix yellow particle warning when Assaults spam the Inferno-X Cannon#50abielsaf wants to merge 1 commit into
abielsaf wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Spamming the Inferno-X Cannon (device 2914) spawned a yellow engine warning on screen — Emitter spawn vertices: N (…kB of verts), clamp to 515 — visible to both the firing Assault and surrounding players.
Root cause traced in the client binary: it's UE3's native sprite-budget clamp in ParticleEmitterInstances.cpp (SpawnParticles), which fires when ActiveParticles + thisTickSpawn > GEngine->MaxParticleSpriteCount. The over-budget emitter is the charge-up burst inside PS_EFX_BeamChargeUpA.
The cannon's beam modes are continuous_fire but were also flagged interrupt_fire_anim_on_refire = 1. On a continuous beam that means the fire anim is torn down and restarted on every refire (~0.1s), and each restart re-spawns the charge-up burst. Rapid fire stacks bursts faster than the particles die, so ActiveParticles blows past the budget and the clamp warning prints. It replicates to everyone because the FX plays off flash/anim replication — which is why bystanders saw it too.
The client is byte-identical to the original-server era (same MaxParticleSpriteCount), so the only variable is server-driven fire cadence — this is a server-side data fix, not a client bug.
Fix
Clear interrupt_fire_anim_on_refire_flag (1 → 0) for the Inferno-X Cannon's two beam modes (3339 primary, 3409 alt). The beam anim now plays once per fire sequence instead of restarting every refire, so the charge-up burst no longer stacks. continuous_fire stays 1; firing behavior and damage are unchanged.
Applied as an unconditional, idempotent enforce in Database.cpp (mirrors the existing VR-heal-pad enforce), placed after the versioned if (version < N) gates and before the version_info update.
How it applies to an existing populated server.db
server.db is a generated artifact — it is not tracked or merged. The fix ships in code and runs on every server startup:
UPDATE asm_data_set_devices_data_set_device_modes
SET interrupt_fire_anim_on_refire_flag = 0
WHERE device_mode_id IN (3339, 3409)
AND interrupt_fire_anim_on_refire_flag <> 0;
Because it's outside the version gates, it doesn't matter that a live DB's version counter is already past them — it always executes against whatever server.db is present. On an already-populated DB (the normal case) the two rows exist, so the fix lands on the first restart after merge. The <> 0 guard makes every subsequent run a no-op (idempotent, zero rows touched). Clients pick up the corrected flag when they fetch device data on connect.
Edge case: on a brand-new empty DB, the device-modes table is populated by AsmDataCapture during the first game run (after startup migrations), so the enforce needs one extra restart to catch it. Irrelevant for any real deployment, which already has a populated DB.
Verified on VR with two Assaults firing side by side, spamming left- and right-click — no warning, weapon fires normally.
Related to : https://discord.com/channels/994691794627461211/1529815224671141908
