View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0005087 | Spring engine | General | public | 2016-02-13 00:14 | 2016-02-13 00:46 |
| Reporter | silentwings | Assigned To | hokomoko | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Product Version | 100.0+git | ||||
| Summary | 0005087: Spring.GetUnitIsTransporting returns incorrect values if more than one transport is queried | ||||
| Description | If a single transporter is selected, Spring.GetUnitIsTransporting() returns the correct table. If two transporters are selection, and Spring.GetUnitIsTransporting() is called for both of them, the second transporter than it is called for has nils where there should be unitIDs. | ||||
| Steps To Reproduce | With bar:test, use the widget below. Give 2 corvalk, and 2 corocom Load one corcom into each corvalk Select each corvalk independently, and press Z, to see the widget echo Select both corvalk togeter, and press Z, and the widget will crash because tID is nil for the second transporter | ||||
| Additional Information | function widget:GetInfo() return { name = "Test_2", version = "0", desc = "", author = "", date = "", license = "", layer = 0, enabled = true } end include('keysym.h.lua') function widget:KeyPress(key,_,_) if key==KEYSYMS.Z then local sUnits = Spring.GetSelectedUnits() for i=1,#sUnits do local unitID = sUnits[i] local transported = Spring.GetUnitIsTransporting(unitID) Spring.Echo(UnitDefs[Spring.GetUnitDefID(unitID)].name .. " is transporting " .. #transported .. " units. Their unitIDs are:") for j=1,#transported do local tID = transported[i] Spring.Echo(" " .. tID) end end end end | ||||
| Tags | No tags attached. | ||||
| Checked infolog.txt for Errors | |||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2016-02-13 00:14 | silentwings | New Issue | |
| 2016-02-13 00:45 | hokomoko | Status | new => closed |
| 2016-02-13 00:45 | hokomoko | Assigned To | => hokomoko |
| 2016-02-13 00:45 | hokomoko | Resolution | open => no change required |
| 2016-02-13 00:46 | hokomoko | Note Added: 0015755 | |
| 2016-02-13 00:46 | hokomoko | Status | closed => feedback |
| 2016-02-13 00:46 | hokomoko | Resolution | no change required => reopened |
| 2016-02-13 00:46 | hokomoko | Status | feedback => closed |
| 2016-02-13 00:46 | hokomoko | Resolution | reopened => no change required |