mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-08 11:01:33 +00:00
server: 2x speedup of computing PVS on 64-bit CPU architectures
This commit is contained in:
parent
e38811ef94
commit
70ab4f69c3
1 changed files with 5 additions and 5 deletions
|
@ -2154,11 +2154,11 @@ void UTIL_SetClientVisibilityPVS( edict_t *pClient, const unsigned char *pvs, in
|
|||
|
||||
g_CheckClient.m_bClientPVSIsExpanded = false;
|
||||
|
||||
unsigned *pFrom = (unsigned *)pvs;
|
||||
unsigned *pMask = (unsigned *)g_CheckClient.m_checkPVS;
|
||||
unsigned *pTo = (unsigned *)g_CheckClient.m_checkVisibilityPVS;
|
||||
size_t *pFrom = (size_t *)pvs;
|
||||
size_t *pMask = (size_t *)g_CheckClient.m_checkPVS;
|
||||
size_t *pTo = (size_t *)g_CheckClient.m_checkVisibilityPVS;
|
||||
|
||||
int limit = pvssize / 4;
|
||||
int limit = pvssize / static_cast<int>( sizeof(size_t) );
|
||||
int i;
|
||||
|
||||
for ( i = 0; i < limit; i++ )
|
||||
|
@ -2171,7 +2171,7 @@ void UTIL_SetClientVisibilityPVS( edict_t *pClient, const unsigned char *pvs, in
|
|||
}
|
||||
}
|
||||
|
||||
int remainder = pvssize % 4;
|
||||
int remainder = pvssize % static_cast<int>( sizeof(size_t) );
|
||||
for ( i = 0; i < remainder; i++ )
|
||||
{
|
||||
((unsigned char *)&pTo[limit])[i] = ((unsigned char *)&pFrom[limit])[i] & ~((unsigned char *)&pMask[limit])[i];
|
||||
|
|
Loading…
Reference in a new issue