diff --git a/src/r_things.cpp b/src/r_things.cpp index b8d717be1..d65eb2a81 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -1659,13 +1659,6 @@ fixed_t R_GetSpriteDirectionalLighting(angle_t angle) return extralight; } -INT32 R_ThingLightLevel(mobj_t* thing) -{ - INT32 lightlevel = thing->lightlevel; - - return lightlevel; -} - // // R_ProjectSprite // Generates a vissprite for a thing diff --git a/src/r_things.h b/src/r_things.h index c85b2c63d..69f0ec518 100644 --- a/src/r_things.h +++ b/src/r_things.h @@ -97,7 +97,10 @@ boolean R_ThingIsFlashing(mobj_t *thing); boolean R_ThingIsUsingBakedOffsets(mobj_t *thing); -INT32 R_ThingLightLevel(mobj_t *thing); +FUNCINLINE static ATTRINLINE INT32 R_ThingLightLevel(mobj_t* thing) +{ + return (INT32)thing->lightlevel; +} // -------------- // MASKED DRAWING @@ -110,7 +113,7 @@ struct maskcount_t { size_t drawsegs[2]; size_t vissprites[2]; - fixed_t viewx, viewy, viewz; /**< View z stored at the time of the BSP traversal for the view/portal. Masked sorting/drawing needs it. */ + fixed_t viewx, viewy, viewz; /**< View z stored at the time of the BSP traversal for the view/portal. Masked sorting/drawing needs it. */ sector_t* viewsector; };