cortex-command-community / Cortex-Command-Community-Project

Cortex Command - Open Source under GNU AGPL v3

Home Page:https://cortex-command-community.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Changing Min/MaxVelocity of Emissions gets reset every frame

comradeshook opened this issue · comments

Describe the bug
When you use a for-loop iterator to change Min/Max velocity of an AEmitter's emissions, the change appears to be reset every frame and does not affect the velocity of the emitted particles. I have not tested this for other emission properties yet.

To Reproduce
Define any emitter with at least one Emission, and try using Lua to change the velocities of the emissions. The change does not persist.

Expected behavior
Changes to Min/MaxVelocity should be persistent.

Screenshots
image
This code only prints the initially defined MinVelocity of the emitter, or 0 if undefined. Placing the print after the change displays the correct value, but it is reset before emission.

emitterbug.zip

Please add a test script for this. There's a lot of prerequisite setup I'd need to do to be able to test this reliably

Ah right, forgot about that; here's a mod for repro. Just spawn the bomb from the 00emitterbug group and observe as the emission doesn't change velocity despite being randomised every frame.
emitterbug.zip