Fix compilation with GCC 8.2+ (#617)
* GCC 8.2 support * Add GCC version check * -Werror=class-memaccess fix in code * Use assignment for Stats
This commit is contained in:
committed by
Vincent Herbet
parent
c86813697a
commit
0ccba67006
@ -95,14 +95,14 @@ void CPlayer::restartStats(bool all)
|
||||
if ( all )
|
||||
{
|
||||
memset(weapons,0,sizeof(weapons));
|
||||
memset(&round,0,sizeof(round));
|
||||
memset(static_cast<void *>(&round),0,sizeof(round));
|
||||
memset(weaponsRnd,0,sizeof(weaponsRnd));
|
||||
}
|
||||
|
||||
memset(weaponsLife,0,sizeof(weaponsLife)); //DEC-Weapon (Round) stats
|
||||
memset(attackers,0,sizeof(attackers));
|
||||
memset(victims,0,sizeof(victims));
|
||||
memset(&life,0,sizeof(life));
|
||||
life = {};
|
||||
}
|
||||
|
||||
void CPlayer::Init( int pi, edict_t* pe )
|
||||
|
@ -172,7 +172,7 @@ void PlayerPreThink_Post(edict_t *pEntity)
|
||||
if(pPlayer->clearRound && pPlayer->clearRound < gpGlobals->time)
|
||||
{
|
||||
pPlayer->clearRound = 0.0f;
|
||||
memset(&pPlayer->round,0,sizeof(pPlayer->round));
|
||||
memset(static_cast<void *>(&pPlayer->round),0,sizeof(pPlayer->round));
|
||||
memset(pPlayer->weaponsRnd,0,sizeof(pPlayer->weaponsRnd));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user