I figured out what's going on with the display board in Monopoly. There are actually two different bugs conspiring together on this one. Each led element has two "light" objects ... i.e. Light40 and Light40f, the F being the gray "off" state, with Light40 being the red "on".
Bug #1 - in the script, the on/off states are toggled simultaneously, and VP doesn't try to determine which was the most recently changed item, so it isn't sure which light to bring to the top. This is super easy to work around though, just toggle only the light we want to come to the top:
old:
If (stat and 1) = 1 Then
ledf(num)(y).state = 0
Led(num)(y).state = 1
else
Led(num)(y).state = 0
ledf(num)(y).state = 1
end if
new:
If (stat and 1) = 1 Then
Led(num)(y).state = 0
Led(num)(y).state = 1
Else
ledf(num)(y).state = 0
ledf(num)(y).state = 1
End If
Bug #2: Of course, I did this and no matter what I did I couldn't see the red light ... ever, even if I never turned on ledf. After a lot of WTFs, I sat in the debugger for a while. The reason: the lights live in the backdrop! There's some code that blocks all backglass items from going into the light vector, which is what allows them to come to the front when the state changes. If I change that a little:
if (pe->m_fBackglass && pe->GetItemType()!=eItemLight)
m_vHitBackglass.push_back(ph); // VP9COMPAT: fixes Homer head on TSPP, remove in VP10
else if (pe->GetItemType() == eItemLight)
m_vLights.push_back(ph); // VP9COMPAT: special treatment for lights
the lights start to work again.
Edited by DJRobX, 21 March 2014 - 06:13 PM.