MegaGlest Forum

MegaGlest => Bug reports => Closed bug reports => Topic started by: ctz on 2 January 2015, 17:14:18

Title: [fixed]v3.11-beta2.0: colorpicking order of dead units is wrong
Post by: ctz on 2 January 2015, 17:14:18
The order of colorpicking is sometimes wrong.  It is most noticeable when you are in a battle that produces lots of dead units and you want to select/target a live unit; it seems that for colorpicking, dead units are drawn above live ones.

I can't reliably reproduce the screenshot-during-selection bug/feature, but I got screenshots anyway:
https://imgur.com/a/EIUtG

The archmages are standing on top of a pile of dead daemons, but they are below the daemons for colorpicking, making them difficult to select.

This may be related to what will pointed out in https://forum.megaglest.org/index.php?topic=9308.msg89443#msg89443 .
Title: Re: v3.11-beta2.0: colorpicking order of dead units is wrong
Post by: titi_son on 3 January 2015, 17:53:13
this would be easy to fix:
just add
Code: [Select]
if(colorPickingSelection && unit->getCurrSkill()->getClass()==scDie) {
continue;
}
in renderer.cpp Renderer::renderUnitsFast ( line 7731 ).

(click to show/hide)

But we seriously need something to render the units in the right order...
Title: Re: v3.11-beta2.0: colorpicking order of dead units is wrong
Post by: titi on 4 January 2015, 17:19:56
Something very similar to this is in git now. Sadly its not the reason for colorpicking trouble. But I changed something in another branch where I am able to use depth buffer now for colorpicking too. By this the units are rendered in the right order and maybe it fixes more of our selection problems.