In the particle effect code there is a small hack required for getting
some constant pointers in a vector. However, there is another mechanism
where sources are not added to the sources vector if the sources are
currently being iterated through. That is necessary to avoid
accidentally invalidating the iterators.
The issue here was that the vector resizing hack was not applied to the
correct vector when we were currently iterating. This fixes that.
This fixes#2928.
Nightmare discovered an off-by-one error when checking the validity of a
particle effect handle. Since the new ID system makes that much easier
and less error-prone I decided to go ahead and convert all handles to
an ID typedef which also fixes the reported bug.
Before, if any parsing call failed it would throw an exception which
would have been propagated to the exception handler in main() which
terminates the program. This should fix that.
The new design is centered around the Event Trace JSON format but it
should still be possible to adapt it for other profiling tools. The old
profiling system has been removed.