summaryrefslogtreecommitdiff
path: root/src/game/g_admin.c
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2017-04-14 19:08:11 +0200
committer/dev/humancontroller <devhc@example.com>2017-04-15 17:24:15 +0200
commit5e472f35354986a26ec9460fff2fc8b14dadf773 (patch)
tree627eb35c40a19ce67149a550890a055568e3c805 /src/game/g_admin.c
parent91496cdb54e11d8ac746bb6982b0ade24c035503 (diff)
fix a bunch of %i format flags / arguments
Diffstat (limited to 'src/game/g_admin.c')
-rw-r--r--src/game/g_admin.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c
index 5761586..1becfa8 100644
--- a/src/game/g_admin.c
+++ b/src/game/g_admin.c
@@ -1363,8 +1363,8 @@ static int admin_listadmins( gentity_t *ent, int start, char *search, int minlev
{
G_DecolorString( g_admin_levels[ j ]->name, lname );
Com_sprintf( lname_fmt, sizeof( lname_fmt ), "%%%is",
- ( admin_level_maxname + strlen( g_admin_levels[ j ]->name )
- - strlen( lname ) ) );
+ ( admin_level_maxname + (int)( strlen( g_admin_levels[ j ]->name )
+ - strlen( lname ) ) ) );
Com_sprintf( lname, sizeof( lname ), lname_fmt,
g_admin_levels[ j ]->name );
break;
@@ -1428,8 +1428,8 @@ static int admin_listadmins( gentity_t *ent, int start, char *search, int minlev
{
G_DecolorString( g_admin_levels[ j ]->name, lname );
Com_sprintf( lname_fmt, sizeof( lname_fmt ), "%%%is",
- ( admin_level_maxname + strlen( g_admin_levels[ j ]->name )
- - strlen( lname ) ) );
+ ( admin_level_maxname + (int)( strlen( g_admin_levels[ j ]->name )
+ - strlen( lname ) ) ) );
Com_sprintf( lname, sizeof( lname ), lname_fmt,
g_admin_levels[ j ]->name );
break;
@@ -3810,7 +3810,7 @@ qboolean G_admin_adminlog( gentity_t *ent, int skiparg )
t = results[ i ]->time / 1000;
G_DecolorString( results[ i ]->name, n1 );
Com_sprintf( fmt_name, sizeof( fmt_name ), "%%%ds",
- ( name_length + strlen( results[ i ]->name ) - strlen( n1 ) ) );
+ ( name_length + (int)( strlen( results[ i ]->name ) - strlen( n1 ) ) ) );
Com_sprintf( n1, sizeof( n1 ), fmt_name, results[ i ]->name );
Com_sprintf( levelbuf, sizeof( levelbuf ), "%2d", results[ i ]->level );
ADMBP( va( "%s%3d %3d:%02d %2s ^7%s^7 %s!%s ^7%s^7\n",
@@ -4061,7 +4061,7 @@ qboolean G_admin_tklog( gentity_t *ent, int skiparg )
G_DecolorString( results[ i ]->name, n1 );
Com_sprintf( fmt_name, sizeof( fmt_name ), "%%%ds",
- ( name_length + strlen( results[ i ]->name ) - strlen( n1 ) ) );
+ ( name_length + (int)( strlen( results[ i ]->name ) - strlen( n1 ) ) ) );
Com_sprintf( n1, sizeof( n1 ), fmt_name, results[ i ]->name );
if( results[ i ]->team == PTE_HUMANS )
@@ -5088,7 +5088,7 @@ qboolean G_admin_listplayers( gentity_t *ent, int skiparg )
{
G_DecolorString( lname, lname2 );
Com_sprintf( lname_fmt, sizeof( lname_fmt ), "%%%is",
- ( admin_level_maxname + strlen( lname ) - strlen( lname2 ) ) );
+ ( admin_level_maxname + (int)( strlen( lname ) - strlen( lname2 ) ) ) );
Com_sprintf( lname2, sizeof( lname2 ), lname_fmt, lname );
}
break;
@@ -5528,12 +5528,12 @@ qboolean G_admin_showbans( gentity_t *ent, int skiparg )
G_DecolorString( g_admin_bans[ i ]->name, n1 );
Com_sprintf( name_fmt, sizeof( name_fmt ), "%%-%is",
- ( max_name + strlen( g_admin_bans[ i ]->name ) - strlen( n1 ) ) );
+ ( max_name + (int)( strlen( g_admin_bans[ i ]->name ) - strlen( n1 ) ) ) );
Com_sprintf( n1, sizeof( n1 ), name_fmt, g_admin_bans[ i ]->name );
G_DecolorString( g_admin_bans[ i ]->banner, n2 );
Com_sprintf( banner_fmt, sizeof( banner_fmt ), "%%-%is",
- ( max_banner + strlen( g_admin_bans[ i ]->banner ) - strlen( n2 ) ) );
+ ( max_banner + (int)( strlen( g_admin_bans[ i ]->banner ) - strlen( n2 ) ) ) );
Com_sprintf( n2, sizeof( n2 ), banner_fmt, g_admin_bans[ i ]->banner );
bannerslevel = g_admin_bans[ i ]->bannerlevel;
@@ -6150,7 +6150,7 @@ qboolean G_admin_register(gentity_t *ent, int skiparg ){
return qfalse;
}
- trap_SendConsoleCommand( EXEC_APPEND,va( "!setlevel %d %d;",ent - g_entities, level) );
+ trap_SendConsoleCommand( EXEC_APPEND,va( "!setlevel %d %d;", (int)(ent - g_entities), level) );
AP( va( "print \"^3!register: ^7%s^7 is now a protected nickname.\n\"", ent->client->pers.netname) );
@@ -7738,7 +7738,7 @@ qboolean G_admin_revert( gentity_t *ent, int skiparg )
Com_sprintf( argbuf, sizeof argbuf, "%s%s%s%s%s%s%s!",
( repeat > 1 ) ? "x" : "", ( repeat > 1 ) ? va( "%d ", repeat ) : "",
( ID ) ? "#" : "", ( ID ) ? va( "%d ", ptr->ID ) : "",
- ( builder ) ? "-" : "", ( builder ) ? va( "%d ", builder - g_entities ) : "",
+ ( builder ) ? "-" : "", ( builder ) ? va( "%d ", (int)( builder - g_entities ) ) : "",
( team == PTE_ALIENS ) ? "a " : ( team == PTE_HUMANS ) ? "h " : "" );
ADMP( va( "^3!revert: ^7revert aborted: reverting this %s would conflict with "
"another buildable, use ^3!revert %s ^7to override\n", action, argbuf ) );
@@ -7766,7 +7766,7 @@ qboolean G_admin_revert( gentity_t *ent, int skiparg )
Com_sprintf( argbuf, sizeof argbuf, "%s%s%s%s%s%s%s!",
( repeat > 1 ) ? "x" : "", ( repeat > 1 ) ? va( "%d ", repeat ) : "",
( ID ) ? "#" : "", ( ID ) ? va( "%d ", ptr->ID ) : "",
- ( builder ) ? "-" : "", ( builder ) ? va( "%d ", builder - g_entities ) : "",
+ ( builder ) ? "-" : "", ( builder ) ? va( "%d ", (int)( builder - g_entities ) ) : "",
( team == PTE_ALIENS ) ? "a " : ( team == PTE_HUMANS ) ? "h " : "" );
ADMP( va( "^3!revert: ^7revert aborted: reverting this %s would "
"conflict with another buildable, use ^3!revert %s ^7to override\n",