mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-05-31 01:10:52 +00:00
- 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:
parent
ec655ffa2b
commit
ead4444982
2 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue