mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-23 21:24:27 +00:00
Fix copying string to itself
This commit is contained in:
parent
8912a963ca
commit
feb2aefd88
@ -286,6 +286,7 @@ void CHalfLifeTeamplay::ChangePlayerTeam( CBasePlayer *pPlayer, const char *pTea
|
|||||||
}
|
}
|
||||||
|
|
||||||
// copy out the team name from the model
|
// copy out the team name from the model
|
||||||
|
if( pPlayer->m_szTeamName != pTeamName )
|
||||||
strncpy( pPlayer->m_szTeamName, pTeamName, TEAM_NAME_LENGTH );
|
strncpy( pPlayer->m_szTeamName, pTeamName, TEAM_NAME_LENGTH );
|
||||||
|
|
||||||
g_engfuncs.pfnSetClientKeyValue( clientIndex, g_engfuncs.pfnGetInfoKeyBuffer( pPlayer->edict() ), "model", pPlayer->m_szTeamName );
|
g_engfuncs.pfnSetClientKeyValue( clientIndex, g_engfuncs.pfnGetInfoKeyBuffer( pPlayer->edict() ), "model", pPlayer->m_szTeamName );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user