fixed z-fighting when drawing Onyx in 3D

This commit is contained in:
Zeno Rogue 2020-01-28 13:01:28 +01:00
parent a5a9104abf
commit b931e5e333
1 changed files with 6 additions and 2 deletions

View File

@ -912,8 +912,12 @@ EX bool drawItemType(eItem it, cell *c, const transmatrix& V, color_t icol, int
queuepolyat(V2, *xsh, darkena(icol, 0, alpha), pr);
if(it == itZebra)
queuepolyat(Vit * spinptick(1500, .5/(ct6+6)), *xsh, darkena(0x202020, 0, hidden ? 0x40 : 0xF0), PPR::ITEMb);
if(it == itZebra) {
transmatrix Vx = Vit * spinptick(1500, .5/(ct6+6));
if(GDIM == 3)
Vx = Vx * cpush(2, -1e-3);
queuepolyat(Vx, *xsh, darkena(0x202020, 0, hidden ? 0x40 : 0xF0), PPR::ITEMb);
}
}
else if(xch == 'o' || it == itInventory) {