mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-07 17:29:36 +00:00
WIP: fix some memaccess-class warnings
This commit is contained in:
@@ -36,7 +36,7 @@ int CopyLocalLightingState( int nMaxLights, LightDesc_t *pDest, int nLightCount,
|
||||
for( int i = 0; i < nLightCount; i++ )
|
||||
{
|
||||
LightDesc_t *pLight = &pDest[i];
|
||||
memcpy( pLight, &pSrc[i], sizeof( LightDesc_t ) );
|
||||
*pLight = pSrc[i];
|
||||
pLight->m_Flags = 0;
|
||||
if( pLight->m_Attenuation0 != 0.0f )
|
||||
{
|
||||
@@ -539,4 +539,4 @@ void CStudioRenderContext::ComputeLightingConstDirectional( const Vector* pAmbie
|
||||
// color from the ambient cube calculated in ComputeLightingCommon
|
||||
int index = ComputeLightingCommon( pAmbient, lightCount, pLights, pt, normal, m_pLightPos, lighting );
|
||||
R_LightEffectsWorldFunctionTableConstDirectional::functions[index]( pLights, m_pLightPos, normal, lighting, flDirectionalAmount );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "tier1/callqueue.h"
|
||||
#include "cmodel.h"
|
||||
#include "tier0/vprof.h"
|
||||
#include "tier1/memhelpers.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
@@ -1994,7 +1995,7 @@ void CStudioRenderContext::SetAmbientLightColors( const Vector *pColors )
|
||||
|
||||
void CStudioRenderContext::SetAmbientLightColors( const Vector4D *pColors )
|
||||
{
|
||||
memcpy( m_RC.m_LightBoxColors, pColors, 6 * sizeof(Vector4D) );
|
||||
memutils::copy( &m_RC.m_LightBoxColors[0], pColors, 6 );
|
||||
|
||||
// FIXME: Would like to get this into the render thread, but there's systemic confusion
|
||||
// about whether to set lighting state here or in the material system
|
||||
|
||||
Reference in New Issue
Block a user