- made some changes to the lighting calculations for weapons so that the chaingun's fullbright flash state looks better.

git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@576 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
Christoph Oelckers 2009-10-24 07:57:30 +00:00
parent ec655ffa2b
commit ead4444982
2 changed files with 8 additions and 2 deletions

View file

@ -209,9 +209,9 @@ int gl_CalcLightLevel(int lightlevel, int rellight, bool weapon)
{
int light;
if (glset.lightmode&2 && lightlevel<192)
if (glset.lightmode&2 && lightlevel<192 && !weapon)
{
light = (192.f - (192-lightlevel)* (weapon? 1.5f : 1.95f));
light = (192.f - (192-lightlevel)* 1.95f);
}
else
{

View file

@ -272,6 +272,12 @@ void FGLRenderer::DrawPlayerSprites(sector_t * viewsector, bool hudModelStep)
// now draw the different layers of the weapon
gl_RenderState.EnableBrightmap(true);
if (statebright[0] || statebright[1])
{
// brighten the weapon to reduce the difference between
// normal sprite and fullbright flash.
lightlevel = (2*lightlevel+255)/3;
}
for (i=0, psp=player->psprites; i<=ps_flash; i++,psp++)
{
if (psp->state)