You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for a widget idea i had, i kinda need to know the team that destroyed a unit. i can understand why these fields might not be populated in some cases (attacker offscreen). but this occurs even when i kill units that i can see on screen
The text was updated successfully, but these errors were encountered:
Description
the UnitDestroyed handler is missing some fields
looking at https://beyond-all-reason.github.io/spring/ldoc/modules/LuaHandle.html#UnitDestroyed, i'd expect to see
attackerID
,attackerDefID
, andattackerTeam
populated, but all of them arenil
when printedthis occurs whether i can see the unit being killed or not, and whether i can see the attacker unit or not
also not sure why
weaponDefID
isn't being populated, it's in the docs but not in the codetaking a look at the code i can't figure out why these aren't being populated: https://github.com/beyond-all-reason/spring/blob/BAR105/rts/Lua/LuaHandle.cpp#L1096
Expected Behaviour
the value of
attackerID
,attackerDefID
, andattackerTeam
is set when a unit is destroyedActual Behaviour
attackerID
,attackerDefID
, andattackerTeam
are all nilReproduction steps
attackerID
,attackerDefID
, andattackerTeam
are nil when printed in the handlerwidget:UnitDestroyed
Other
widget is defined in
Beyond-All-Reason\data\LuaUI\Widgets
basic widget that shows this:
for a widget idea i had, i kinda need to know the team that destroyed a unit. i can understand why these fields might not be populated in some cases (attacker offscreen). but this occurs even when i kill units that i can see on screen
The text was updated successfully, but these errors were encountered: