readd mobj lightlevel field so i dont have to edit frameflags
This commit is contained in:
1 parent
8bd943eb71
commit
09e901b31b
3 files changed
+11
-1
No files matched your search
@@ -344,6 +344,8 @@ void HWR_ObjectLightLevelPost(gl_vissprite_t *spr, const sector_t *sector, INT32
|
||||
{
|
||||
(void)papersprite;
|
||||
|
||||
*lightlevel += R_ThingLightLevel(spr->mobj);
|
||||
|
||||
if (maplighting.directional == false || !P_SectorUsesDirectionalLighting(sector) || model == true)
|
||||
return;
|
||||
|
||||
|
||||
+8
-1
@@ -109,6 +109,13 @@ static drawseg_xrange_item_t *drawsegs_xrange;
|
||||
static size_t drawsegs_xrange_size = 0;
|
||||
static INT32 drawsegs_xrange_count = 0;
|
||||
|
||||
INT32 R_ThingLightLevel(mobj_t* thing)
|
||||
{
|
||||
INT32 lightlevel = thing->lightlevel;
|
||||
|
||||
return lightlevel;
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
//
|
||||
// Sprite loading routines: support sprites in pwad, dehacked sprite renaming,
|
||||
@@ -1609,7 +1616,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
||||
lightnum = thing->subsector->sector->lightlevel;
|
||||
}
|
||||
|
||||
lightnum = (lightnum) >> LIGHTSEGSHIFT;
|
||||
lightnum = (lightnum + R_ThingLightLevel(thing)) >> LIGHTSEGSHIFT;
|
||||
|
||||
if (maplighting.directional == true && P_SectorUsesDirectionalLighting(thing->subsector->sector))
|
||||
{
|
||||
|
||||
@@ -57,6 +57,7 @@ extern fixed_t windowtop;
|
||||
extern fixed_t windowbottom;
|
||||
extern INT32 lengthcol;
|
||||
|
||||
INT32 R_ThingLightLevel(mobj_t *thing);
|
||||
fixed_t R_GetSpriteDirectionalLighting(angle_t angle);
|
||||
|
||||
fixed_t R_GetShadowZ(mobj_t *thing, pslope_t **shadowslope);
|
||||
|
||||
Reference in new issue
Block a user