mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-02-05 10:10:42 +03:00
Fixed m_bDrawPlayerModelExternally causing the player's model to block flashlight shadows
This commit is contained in:
parent
76af96e3ae
commit
1c3b374d9e
@ -1489,8 +1489,9 @@ int C_BasePlayer::DrawModel( int flags )
|
|||||||
if (m_bDrawPlayerModelExternally)
|
if (m_bDrawPlayerModelExternally)
|
||||||
{
|
{
|
||||||
// Draw the player in any view except the main or "intro" view, both of which are default first-person views.
|
// Draw the player in any view except the main or "intro" view, both of which are default first-person views.
|
||||||
|
// HACKHACK: Also don't draw in shadow depth textures if the player's flashlight is on, as that causes the playermodel to block it.
|
||||||
view_id_t viewID = CurrentViewID();
|
view_id_t viewID = CurrentViewID();
|
||||||
if (viewID == VIEW_MAIN || viewID == VIEW_INTRO_CAMERA)
|
if (viewID == VIEW_MAIN || viewID == VIEW_INTRO_CAMERA || (viewID == VIEW_SHADOW_DEPTH_TEXTURE && IsEffectActive(EF_DIMLIGHT)))
|
||||||
{
|
{
|
||||||
// Make sure the player model wouldn't draw anyway...
|
// Make sure the player model wouldn't draw anyway...
|
||||||
if (!ShouldDrawThisPlayer())
|
if (!ShouldDrawThisPlayer())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user