View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0004363 | Spring engine | Lua | public | 2014-04-18 10:05 | 2014-05-10 08:57 | ||||
Reporter | Google_Frog | ||||||||
Assigned To | Kloot | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 96.0.1+git | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0004363: 96.0.1-404 Spring.IsUnitIcon is broken | ||||||||
Description | Sometimes Spring.IsUnitIcon returns true when it should not. This occurs when the camera is almost zoomed out far enough to make a unit display as an icon. As far as I can tell the callin has always been broken. This callin is required to make a decent replacement for the default engine selection visualization. In its current state these widgets show units as deselected when they are actually selected and this is very annoying. The callin appears to be based on distance because it is affected by hills. Whether a unit is actually an icon depends on something else. This problem occurs even on completely flat maps. | ||||||||
Steps To Reproduce | The easiest way to reproduce is to move the camera to just below the level at which units are shown as icons. Then spawn about 400 large units and scroll around with a selection widget enabled as they tend to use Spring.IsUnitIcon. My flat map screenshot uses armsolar on the map white with Blurry Selection Halo enabled. This code demonstrates the problem: function widget:Update() local mx, my = Spring.GetMouseState() local pointedType, unitID = Spring.TraceScreenRay(mx, my) if pointedType == 'unit' and Spring.ValidUnitID(unitID) then local icon = Spring.IsUnitIcon(unitID) WG.UnitEcho(unitID, icon and "icon" or "model") end end | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
![]() |
|
jK (developer) 2014-04-18 22:08 |
Maybe it returns true already for faricons (texture billboards)? |
Google_Frog (reporter) 2014-04-19 04:58 |
After some messing around with lod I determined that it does not affect this bug. When I first tested it lod was 5x higher than my icon distance so I never saw billboards. I just attached a lod screenshot which shows some billboard units (the light ones) as well as some models (the dark ones). The selection graphics show that Spring.IsUnitIcon goes from false to true partway through the block of units. |
Google_Frog (reporter) 2014-05-10 08:03 |
This has been fixed. The ticket can be closed. |
cleanrock (reporter) 2014-05-10 08:57 |
Probably fixed by https://github.com/spring/spring/commit/c38e590 |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2014-04-18 10:05 | Google_Frog | New Issue | |
2014-04-18 10:05 | Google_Frog | File Added: hill.jpg | |
2014-04-18 10:06 | Google_Frog | File Added: flat.jpg | |
2014-04-18 22:08 | jK | Note Added: 0013022 | |
2014-04-19 04:54 | Google_Frog | File Added: lod.jpg | |
2014-04-19 04:58 | Google_Frog | Note Added: 0013023 | |
2014-05-10 08:03 | Google_Frog | Note Added: 0013046 | |
2014-05-10 08:57 | cleanrock | Note Added: 0013048 | |
2014-05-10 08:57 | cleanrock | Status | new => resolved |
2014-05-10 08:57 | cleanrock | Resolution | open => fixed |
2014-05-10 08:57 | cleanrock | Assigned To | => Kloot |