Merge remote-tracking branch 'refs/remotes/SDLash3D/master'
This commit is contained in:
commit
b6cd4e64e7
|
@ -1017,7 +1017,7 @@ void CHudAmmo::UserCmd_Autobuy()
|
|||
}
|
||||
|
||||
ConsolePrint(szCmd);
|
||||
gEngfuncs.pfnClientCmd(szCmd);
|
||||
gEngfuncs.pfnServerCmd(szCmd);
|
||||
|
||||
gEngfuncs.COM_FreeFile( afile );
|
||||
}
|
||||
|
@ -1026,8 +1026,9 @@ void CHudAmmo::UserCmd_Rebuy()
|
|||
{
|
||||
char *afile = (char*)gEngfuncs.COM_LoadFile("rebuy.txt", 5, NULL);
|
||||
char *pfile = afile;
|
||||
char token[256];
|
||||
char szCmd[1024];
|
||||
char token[64];
|
||||
char szCmd[512];
|
||||
int lastCh;
|
||||
|
||||
if( !pfile )
|
||||
{
|
||||
|
@ -1035,17 +1036,23 @@ void CHudAmmo::UserCmd_Rebuy()
|
|||
return;
|
||||
}
|
||||
|
||||
strcpy(szCmd, "cl_setrebuy");
|
||||
// start with \"
|
||||
strcpy(szCmd, "cl_setrebuy \"");
|
||||
|
||||
|
||||
|
||||
while(pfile = gEngfuncs.COM_ParseFile( pfile, token ))
|
||||
{
|
||||
// append space first
|
||||
strcat(szCmd, " ");
|
||||
strcat(szCmd, token);
|
||||
// append space after token
|
||||
strcat(szCmd, " ");
|
||||
}
|
||||
// replace last space with ", before terminator
|
||||
lastCh = strlen(szCmd);
|
||||
szCmd[lastCh - 1] = '\"';
|
||||
|
||||
ConsolePrint(szCmd);
|
||||
gEngfuncs.pfnClientCmd(szCmd);
|
||||
gEngfuncs.pfnServerCmd(szCmd);
|
||||
|
||||
gEngfuncs.COM_FreeFile( afile );
|
||||
}
|
||||
|
|
2
yapb
2
yapb
|
@ -1 +1 @@
|
|||
Subproject commit a07850d09da1810fc6985b19f77df891c1b44e48
|
||||
Subproject commit f5303ca0907ec28e1e881dce30e278677e2950b7
|
Loading…
Reference in New Issue