Closed bboudaoud-nv closed 3 years ago
The feature is good. I am noticing a bug, though.
As I switch sessions, going from showReferenceTargetMissDecals = false
to showReferenceTargetMissDecals = true
seems to not work. The other way works.
The feature is good. I am noticing a bug, though.
As I switch sessions, going from
showReferenceTargetMissDecals = false
toshowReferenceTargetMissDecals = true
seems to not work. The other way works.
I can confirm this bug reproduces. I'm working on a fix now.
I also noticed a bug that's been in there for a while where there's a segmentation fault on switching sessions from the GUI with certain decals present. I'm not entirely sure which situations cause it because it only happens occasionally. This crash happens in the following code from Weapon.cpp
on the line with m_scene->remove(m_currentMissDecals.pop());
:
void Weapon::clearDecals(bool clearHitDecal) {
while (m_currentMissDecals.size() > 0) { // Remove and clear miss decals
m_scene->remove(m_currentMissDecals.pop());
}
m_missDecalTimesRemaining.clear(); // Clear miss decal timeouts
if (clearHitDecal && notNull(m_hitDecal)) { // Clear hit decal (if one is present)
m_scene->remove(m_hitDecal);
}
}
I'm going to open an issue for the above problem (if there isn't one yet), then this PR should be ready to merge.
This branch adds a
showReferenceTargetMissDecals
parameter to allow experiment designers to specify whether miss decals should be displayed when firing at the reference target. This parameter defaults totrue
to maintain historical behavior. To disable it, add:to your experiment config.