Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/game/client/c_baseanimating.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3559,6 +3559,18 @@ int C_BaseAnimating::InternalDrawModel( int flags )
AngleMatrix( pInfo->angles, pInfo->origin, pInfo->modelToWorld );
}

#ifdef NEO
if (IsViewModel())
{ // view models become dark when standing close to and facing a wall, change lighting origin
auto pOwner = UTIL_PlayerByIndex(GetLocalPlayerIndex());
if (pOwner)
{
const Vector ownerOrigin = pOwner->EyePosition();
pInfo->pLightingOrigin = &ownerOrigin;
}
}
#endif // NEO

DrawModelState_t state;
matrix3x4_t *pBoneToWorld = NULL;
bool bMarkAsDrawn = modelrender->DrawModelSetup( *pInfo, &state, NULL, &pBoneToWorld );
Expand Down