mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-13 16:37:57 +00:00
Replace snprintf by _snprintf, for MSVC
This commit is contained in:
parent
6818ff091d
commit
6161c6d4d8
@ -181,20 +181,20 @@ int CHudTextMessage::MsgFunc_TextMsg( const char *pszName, int iSize, void *pbuf
|
||||
switch( msg_dest )
|
||||
{
|
||||
case HUD_PRINTCENTER:
|
||||
snprintf( psz, MSG_BUF_SIZE, szBuf[0], szBuf[1], szBuf[2], szBuf[3], szBuf[4] );
|
||||
_snprintf( psz, MSG_BUF_SIZE, szBuf[0], szBuf[1], szBuf[2], szBuf[3], szBuf[4] );
|
||||
CenterPrint( ConvertCRtoNL( psz ) );
|
||||
break;
|
||||
case HUD_PRINTNOTIFY:
|
||||
psz[0] = 1; // mark this message to go into the notify buffer
|
||||
snprintf( psz + 1, MSG_BUF_SIZE - 1, szBuf[0], szBuf[1], szBuf[2], szBuf[3], szBuf[4] );
|
||||
_snprintf( psz + 1, MSG_BUF_SIZE - 1, szBuf[0], szBuf[1], szBuf[2], szBuf[3], szBuf[4] );
|
||||
ConsolePrint( ConvertCRtoNL( psz ) );
|
||||
break;
|
||||
case HUD_PRINTTALK:
|
||||
snprintf( psz, MSG_BUF_SIZE, szBuf[0], szBuf[1], szBuf[2], szBuf[3], szBuf[4] );
|
||||
_snprintf( psz, MSG_BUF_SIZE, szBuf[0], szBuf[1], szBuf[2], szBuf[3], szBuf[4] );
|
||||
gHUD.m_SayText.SayTextPrint( ConvertCRtoNL( psz ), MSG_BUF_SIZE );
|
||||
break;
|
||||
case HUD_PRINTCONSOLE:
|
||||
snprintf( psz, MSG_BUF_SIZE, szBuf[0], szBuf[1], szBuf[2], szBuf[3], szBuf[4] );
|
||||
_snprintf( psz, MSG_BUF_SIZE, szBuf[0], szBuf[1], szBuf[2], szBuf[3], szBuf[4] );
|
||||
ConsolePrint( ConvertCRtoNL( psz ) );
|
||||
break;
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ void ClientDisconnect( edict_t *pEntity )
|
||||
|
||||
char text[256] = "";
|
||||
if( pEntity->v.netname )
|
||||
snprintf( text, sizeof(text), "- %s has left the game\n", STRING( pEntity->v.netname ) );
|
||||
_snprintf( text, sizeof(text), "- %s has left the game\n", STRING( pEntity->v.netname ) );
|
||||
MESSAGE_BEGIN( MSG_ALL, gmsgSayText, NULL );
|
||||
WRITE_BYTE( ENTINDEX( pEntity ) );
|
||||
WRITE_STRING( text );
|
||||
@ -660,7 +660,7 @@ void ClientUserInfoChanged( edict_t *pEntity, char *infobuffer )
|
||||
if( gpGlobals->maxClients > 1 )
|
||||
{
|
||||
char text[256];
|
||||
snprintf( text, 256, "* %s changed name to %s\n", STRING( pEntity->v.netname ), g_engfuncs.pfnInfoKeyValue( infobuffer, "name" ) );
|
||||
_snprintf( text, 256, "* %s changed name to %s\n", STRING( pEntity->v.netname ), g_engfuncs.pfnInfoKeyValue( infobuffer, "name" ) );
|
||||
MESSAGE_BEGIN( MSG_ALL, gmsgSayText, NULL );
|
||||
WRITE_BYTE( ENTINDEX( pEntity ) );
|
||||
WRITE_STRING( text );
|
||||
|
Loading…
Reference in New Issue
Block a user