mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-05-31 01:10:52 +00:00
- changed weapon light level calculations for software light mode.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1497 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
bd41e74094
commit
4485382bea
1 changed files with 6 additions and 5 deletions
|
@ -187,11 +187,6 @@ void FGLRenderer::DrawPlayerSprites(sector_t * viewsector, bool hudModelStep)
|
|||
if(!player || playermo->renderflags&RF_INVISIBLE || !r_drawplayersprites ||
|
||||
mViewActor!=playermo || playermo->RenderStyle.BlendOp == STYLEOP_None) return;
|
||||
|
||||
// hack alert! Rather than changing everything in the underlying lighting code let's just temporarily change
|
||||
// light mode here to draw the weapon sprite.
|
||||
int oldlightmode = glset.lightmode;
|
||||
if (glset.lightmode == 8) glset.lightmode = 2;
|
||||
|
||||
P_BobWeapon (player, &player->psprites[ps_weapon], &ofsx, &ofsy);
|
||||
|
||||
// check for fullbright
|
||||
|
@ -346,6 +341,12 @@ void FGLRenderer::DrawPlayerSprites(sector_t * viewsector, bool hudModelStep)
|
|||
// normal sprite and fullbright flash.
|
||||
if (glset.lightmode != 8) lightlevel = (2*lightlevel+255)/3;
|
||||
}
|
||||
|
||||
// hack alert! Rather than changing everything in the underlying lighting code let's just temporarily change
|
||||
// light mode here to draw the weapon sprite.
|
||||
int oldlightmode = glset.lightmode;
|
||||
if (glset.lightmode == 8) glset.lightmode = 2;
|
||||
|
||||
for (i=0, psp=player->psprites; i<=ps_flash; i++,psp++)
|
||||
{
|
||||
if (psp->state)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue