mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2025-02-16 17:01:08 +00:00
fixed invalid printf argument lists
the CL_AddKeyUpCommands case was quite peculiar: "time" wasn't a variable but the standard C library function
This commit is contained in:
parent
79b2457783
commit
f7a1d6655e
9 changed files with 12 additions and 14 deletions
|
@ -1004,7 +1004,7 @@ int AAS_ReadRouteCache()
|
|||
botimport.FS_Read(&routecacheheader, sizeof(routecacheheader_t), fp );
|
||||
if (routecacheheader.ident != RCID)
|
||||
{
|
||||
AAS_Error("%s is not a route cache dump\n");
|
||||
AAS_Error("%s is not a route cache dump\n", filename);
|
||||
return qfalse;
|
||||
} //end if
|
||||
if (routecacheheader.version != RCVERSION)
|
||||
|
|
|
@ -106,7 +106,7 @@ void BotDumpCharacter(bot_character_t *ch)
|
|||
int i;
|
||||
|
||||
Log_Write("%s", ch->filename);
|
||||
Log_Write("skill %d\n", ch->skill);
|
||||
Log_Write("skill %f\n", ch->skill);
|
||||
Log_Write("{\n");
|
||||
for (i = 0; i < MAX_CHARACTERISTICS; i++)
|
||||
{
|
||||
|
|
|
@ -684,7 +684,7 @@ bot_synonymlist_t *BotLoadSynonyms(char *filename)
|
|||
StripDoubleQuotes(token.string);
|
||||
if (!token.string[0])
|
||||
{
|
||||
SourceError(source, "empty string", token.string);
|
||||
SourceError(source, "empty string");
|
||||
FreeSource(source);
|
||||
return NULL;
|
||||
} //end if
|
||||
|
|
|
@ -981,7 +981,7 @@ int PS_ExpectTokenType(script_t *script, int type, int subtype, token_t *token)
|
|||
if (token->subtype != subtype)
|
||||
{
|
||||
ScriptError(script, "expected %s, found %s",
|
||||
script->punctuations[subtype], token->string);
|
||||
script->punctuations[subtype].p, token->string);
|
||||
return 0;
|
||||
} //end if
|
||||
} //end else if
|
||||
|
|
|
@ -1002,7 +1002,7 @@ void CL_InitKeyCommands()
|
|||
///////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
static void CL_AddKeyUpCommands( int key, const char* kb )
|
||||
static void CL_AddKeyUpCommands( int key, const char* kb, unsigned time )
|
||||
{
|
||||
int i;
|
||||
char button[1024], *buttonPtr;
|
||||
|
@ -1019,8 +1019,7 @@ static void CL_AddKeyUpCommands( int key, const char* kb )
|
|||
if ( button[0] == '+' && keys[key].sendMinusCmd ) {
|
||||
// button commands add keynum and time as parms so that multiple
|
||||
// sources can be discriminated and subframe corrected
|
||||
char cmd[1024];
|
||||
Com_sprintf (cmd, sizeof(cmd), "-%s %i %i\n", button+1, key, time);
|
||||
const char* const cmd = va ("-%s %i %i\n", button + 1, key, (int)time);
|
||||
Cbuf_AddText (cmd);
|
||||
keyevent = qtrue;
|
||||
} else {
|
||||
|
@ -1136,7 +1135,7 @@ void CL_KeyEvent( int key, qbool down, unsigned time )
|
|||
if (!down) {
|
||||
kb = keys[key].binding;
|
||||
|
||||
CL_AddKeyUpCommands( key, kb );
|
||||
CL_AddKeyUpCommands( key, kb, time );
|
||||
|
||||
if ( (cls.keyCatchers & KEYCATCH_UI) && uivm ) {
|
||||
VM_Call( uivm, UI_KEY_EVENT, key, down );
|
||||
|
@ -1182,8 +1181,7 @@ void CL_KeyEvent( int key, qbool down, unsigned time )
|
|||
if ( button[0] == '+') {
|
||||
// button commands add keynum and time as parms so that multiple
|
||||
// sources can be discriminated and subframe corrected
|
||||
char cmd[1024];
|
||||
Com_sprintf (cmd, sizeof(cmd), "%s %i %i\n", button, key, time);
|
||||
const char* const cmd = va ("%s %i %i\n", button, key, (int)time);
|
||||
Cbuf_AddText (cmd);
|
||||
} else {
|
||||
// down-only command
|
||||
|
|
|
@ -3588,7 +3588,7 @@ static const char* Com_GetCompilerInfo()
|
|||
fullVerStr + 4,
|
||||
int(_MSC_BUILD) );
|
||||
} else {
|
||||
info = va( "%scl.exe %s.%02d", fullVerStr, int(_MSC_BUILD) );
|
||||
info = va( "%scl.exe %s.%02d", info, fullVerStr, int(_MSC_BUILD) );
|
||||
}
|
||||
|
||||
return info;
|
||||
|
|
|
@ -306,7 +306,7 @@ qbool Netchan_Process( netchan_t *chan, msg_t *msg )
|
|||
// if we missed a fragment, dump the message
|
||||
if ( fragmentStart != chan->fragmentLength ) {
|
||||
if ( showdrop->integer || showpackets->integer ) {
|
||||
Com_Printf( "%s:Dropped a message fragment\n"
|
||||
Com_Printf( "%s:Dropped a message fragment at %i\n"
|
||||
, NET_AdrToString( chan->remoteAddress )
|
||||
, sequence);
|
||||
}
|
||||
|
|
|
@ -1282,7 +1282,7 @@ static void SV_UserMove( client_t *cl, msg_t *msg, qbool delta ) {
|
|||
if (sv_pure->integer && !cl->pureReceived) {
|
||||
if (cl->state == CS_ACTIVE) {
|
||||
// we didn't get a cp yet, don't assume anything and just send the gamestate all over again
|
||||
Com_DPrintf( "%s: didn't get cp command, resending gamestate\n", cl->name, cl->state );
|
||||
Com_DPrintf( "%s: didn't get cp command, resending gamestate (client state: %d)\n", cl->name, cl->state );
|
||||
SV_SendClientGameState( cl );
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -858,7 +858,7 @@ static void IN_StartupMIDI()
|
|||
( DWORD_PTR ) NULL,
|
||||
CALLBACK_FUNCTION ) != MMSYSERR_NOERROR )
|
||||
{
|
||||
Com_Printf( "WARNING: could not open MIDI device %d: '%s'\n", in_mididevice->integer , s_midiInfo.caps[( int ) in_mididevice->value] );
|
||||
Com_Printf( "WARNING: could not open MIDI device %d: '%s'\n", in_mididevice->integer , s_midiInfo.caps[( int ) in_mididevice->value].szPname );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue