Skip to content

Commit c6d055b

Browse files
game: Fix setting 'snaps' to '20', there's no sv_fps cvar defined, and set trap_Printf due to typo
1 parent fdb2634 commit c6d055b

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

source/game/g_bot.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ static void G_LoadArenasFromFile( const char *filename ) {
131131

132132
len = trap_FS_FOpenFile( filename, &f, FS_READ );
133133
if ( f == FS_INVALID_HANDLE ) {
134-
trap_Print( va( S_COLOR_RED "file not found: %s\n", filename ) );
134+
trap_Printf( va( S_COLOR_RED "file not found: %s\n", filename ) );
135135
return;
136136
}
137137
if ( len >= MAX_ARENAS_TEXT ) {
138-
trap_Print( va( S_COLOR_RED "file too large: %s is %i, max allowed is %i", filename, len, MAX_ARENAS_TEXT ) );
138+
trap_Printf( va( S_COLOR_RED "file too large: %s is %i, max allowed is %i", filename, len, MAX_ARENAS_TEXT ) );
139139
trap_FS_FCloseFile( f );
140140
return;
141141
}
@@ -181,7 +181,7 @@ static void G_LoadArenas( void ) {
181181
strcat(filename, dirptr);
182182
G_LoadArenasFromFile(filename);
183183
}
184-
trap_Print( va( "%i arenas parsed\n", g_numArenas ) );
184+
trap_Printf( va( "%i arenas parsed\n", g_numArenas ) );
185185

186186
for( n = 0; n < g_numArenas; n++ ) {
187187
Info_SetValueForKey( g_arenaInfos[n], "num", va( "%i", n ) );
@@ -619,7 +619,7 @@ static void G_AddBot( const char *name, float skill, const char *team, int delay
619619
Info_SetValueForKey( userinfo, "name", nm );
620620

621621
Info_SetValueForKey( userinfo, "rate", "25000" );
622-
Info_SetValueForKey( userinfo, "snaps", va( "%i", sv_fps.integer ) );
622+
Info_SetValueForKey( userinfo, "snaps", "20" );
623623
Info_SetValueForKey( userinfo, "skill", va("%1.2f", skill) );
624624

625625
// BFP - No handicap
@@ -679,7 +679,7 @@ static void G_AddBot( const char *name, float skill, const char *team, int delay
679679

680680
s = Info_ValueForKey(botinfo, "aifile");
681681
if (!*s ) {
682-
trap_Print( S_COLOR_RED "Error: bot has no aifile specified\n" );
682+
trap_Printf( S_COLOR_RED "Error: bot has no aifile specified\n" );
683683
return;
684684
}
685685

@@ -743,7 +743,7 @@ void Svcmd_AddBot_f( void ) {
743743
// name
744744
trap_Argv( 1, name, sizeof( name ) );
745745
if ( !name[0] ) {
746-
trap_Print( "Usage: Addbot <botname> [skill 1-5] [team] [msec delay] [altname]\n" );
746+
trap_Printf( "Usage: Addbot <botname> [skill 1-5] [team] [msec delay] [altname]\n" );
747747
return;
748748
}
749749

@@ -797,7 +797,7 @@ void Svcmd_BotList_f( void ) {
797797
char model[MAX_QPATH];
798798
char aifile[MAX_QPATH];
799799

800-
trap_Print( S_COLOR_RED "name model aifile funname\n" );
800+
trap_Printf( S_COLOR_RED "name model aifile funname\n" );
801801
for ( i = 0; i < g_numBots; i++ ) {
802802
Q_strncpyz( name, Info_ValueForKey( g_botInfos[i], "name" ), sizeof( name ) );
803803
if ( !*name ) {
@@ -815,7 +815,7 @@ void Svcmd_BotList_f( void ) {
815815
if ( !*aifile ) {
816816
strcpy( aifile, "bots/default_c.c" );
817817
}
818-
trap_Print( va( "%-16s %-16s %-20s %-20s\n", name, model, aifile, funname ) );
818+
trap_Printf( va( "%-16s %-16s %-20s %-20s\n", name, model, aifile, funname ) );
819819
}
820820
}
821821

@@ -890,11 +890,11 @@ static void G_LoadBotsFromFile( const char *filename ) {
890890

891891
len = trap_FS_FOpenFile( filename, &f, FS_READ );
892892
if ( f == FS_INVALID_HANDLE ) {
893-
trap_Print( va( S_COLOR_RED "file not found: %s\n", filename ) );
893+
trap_Printf( va( S_COLOR_RED "file not found: %s\n", filename ) );
894894
return;
895895
}
896896
if ( len >= MAX_BOTS_TEXT ) {
897-
trap_Print( va( S_COLOR_RED "file too large: %s is %i, max allowed is %i\n", filename, len, MAX_BOTS_TEXT ) );
897+
trap_Printf( va( S_COLOR_RED "file too large: %s is %i, max allowed is %i\n", filename, len, MAX_BOTS_TEXT ) );
898898
trap_FS_FCloseFile( f );
899899
return;
900900
}
@@ -944,7 +944,7 @@ static void G_LoadBots( void ) {
944944
strcat(filename, dirptr);
945945
G_LoadBotsFromFile(filename);
946946
}
947-
trap_Print( va( "%i bots parsed\n", g_numBots ) );
947+
trap_Printf( va( "%i bots parsed\n", g_numBots ) );
948948
}
949949

950950

@@ -956,7 +956,7 @@ G_GetBotInfoByNumber
956956
*/
957957
char *G_GetBotInfoByNumber( int num ) {
958958
if( num < 0 || num >= g_numBots ) {
959-
trap_Print( va( S_COLOR_RED "Invalid bot number: %i\n", num ) );
959+
trap_Printf( va( S_COLOR_RED "Invalid bot number: %i\n", num ) );
960960
return NULL;
961961
}
962962
return g_botInfos[num];

0 commit comments

Comments
 (0)