polymost.cpp: fix polymost_dorotatesprite() alpha test/blend issue introduced in r7619

git-svn-id: https://svn.eduke32.com/eduke32@7625 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
pogokeen 2019-05-06 21:53:41 +00:00 committed by Christoph Oelckers
parent 775a0de6c1
commit 40737f44cc
1 changed files with 8 additions and 2 deletions

View File

@ -6847,8 +6847,6 @@ void polymost_dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16
glLoadIdentity();
glDisable(GL_DEPTH_TEST);
glEnable(GL_ALPHA_TEST);
glEnable(GL_BLEND);
#if defined(POLYMER)
# ifdef USE_GLEXT
@ -6861,11 +6859,19 @@ void polymost_dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16
if (!(dastat & RS_NOMASK))
{
glEnable(GL_ALPHA_TEST);
glEnable(GL_BLEND);
if (dastat & RS_TRANS1)
method |= (dastat & RS_TRANS2) ? DAMETH_TRANS2 : DAMETH_TRANS1;
else
method |= DAMETH_MASK;
}
else
{
glDisable(GL_ALPHA_TEST);
glDisable(GL_BLEND);
}
handle_blend(!!(dastat & RS_TRANS1), dablend, !!(dastat & RS_TRANS2));