Skip to content

Commit

Permalink
sgame: Remove a bunch of excess newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
DolceTriade committed Sep 22, 2022
1 parent bf311ad commit ab19a77
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 34 deletions.
6 changes: 3 additions & 3 deletions src/sgame/sg_active.cpp
Expand Up @@ -709,9 +709,9 @@ bool ClientInactivityTimer( gentity_t *ent, bool active )
if( putSpec )
{
trap_SendServerCommand( -1,
va( "print_tr %s %s %s", QQ( N_("$1$^* moved from $2$ to spectators due to inactivity\n") ),
va( "print_tr %s %s %s", QQ( N_("$1$^* moved from $2$ to spectators due to inactivity") ),
Quote( client->pers.netname ), Quote( BG_TeamName( client->pers.team ) ) ) );
G_LogPrintf( "Inactivity: %d\n", (int)( client - level.clients ) );
G_LogPrintf( "Inactivity: %d.", (int)( client - level.clients ) );
G_ChangeTeam( ent, TEAM_NONE );
}
else
Expand All @@ -727,7 +727,7 @@ bool ClientInactivityTimer( gentity_t *ent, bool active )
{
client->inactivityWarning = true;
trap_SendServerCommand( client - level.clients,
va( "cp_tr %s", putSpec ? N_("\"Ten seconds until inactivity spectate!\n\"") : N_("\"Ten seconds until inactivity drop!\n\"") ) );
va( "cp_tr %s", putSpec ? QQ( N_("Ten seconds until inactivity spectate!") ) : QQ( N_("Ten seconds until inactivity drop!") ) ) );
}
}

Expand Down
12 changes: 6 additions & 6 deletions src/sgame/sg_buildable.cpp
Expand Up @@ -1182,7 +1182,7 @@ void G_DeconstructUnprotected( gentity_t *buildable, gentity_t *ent )

// Add to build timer.
ent->client->ps.stats[ STAT_MISC ] += BG_Buildable( buildable->s.modelindex )->buildTime / 4;
}
}

G_Deconstruct( buildable, ent, MOD_DECONSTRUCT );
}
Expand Down Expand Up @@ -1718,7 +1718,7 @@ itemBuildError_t G_CanBuild( gentity_t *ent, buildable_t buildable, int /*distan
return ent->client->pers.team == TEAM_HUMANS ? IBE_NOMOREDRILLS : IBE_NOMORELEECHES;
}
}

return reason;
}

Expand Down Expand Up @@ -2044,12 +2044,12 @@ static gentity_t *SpawnBuildable( gentity_t *builder, buildable_t buildable, con
G_TeamCommand( (team_t) builder->client->pers.team,
va( "print_tr %s %s %s %s", ( readable[ 0 ] ) ?
QQ( N_("$1$ ^2built^* by $2$^*, ^3replacing^* $3$") ) :
QQ( N_("$1$ ^2built^* by $2$$3$\n") ),
QQ( N_("$1$ ^2built^* by $2$$3$") ),
Quote( BG_Buildable( built->s.modelindex )->humanName ),
Quote( builder->client->pers.netname ),
Quote( readable ) ) );
G_LogPrintf( "Construct: %d %d %s%s: %s^* is building "
"%s%s%s\n",
"%s%s%s",
( int )( builder - g_entities ),
( int )( built - g_entities ),
BG_Buildable( built->s.modelindex )->name,
Expand Down Expand Up @@ -2642,7 +2642,7 @@ static void G_BuildLogRevertThink( gentity_t *ent )
built->momentumEarned = ent->momentumEarned;
G_KillBox( built );

G_LogPrintf( "revert: restore %d %s\n",
G_LogPrintf( "revert: restore %d %s",
( int )( built - g_entities ), BG_Buildable( built->s.modelindex )->name );

G_FreeEntity( ent );
Expand Down Expand Up @@ -2681,7 +2681,7 @@ void G_BuildLogRevert( int id )
{
if ( ent->s.eType == entityType_t::ET_BUILDABLE )
{
G_LogPrintf( "revert: remove %d %s\n",
G_LogPrintf( "revert: remove %d %s",
( int )( ent - g_entities ), BG_Buildable( ent->s.modelindex )->name );
}

Expand Down
6 changes: 3 additions & 3 deletions src/sgame/sg_cm_world.cpp
Expand Up @@ -271,7 +271,7 @@ void G_CM_SectorList_f()
c++;
}

Log::Notice( "sector %i: %i entities\n", i, c );
Log::Notice( "sector %i: %i entities", i, c );
}
}

Expand Down Expand Up @@ -384,7 +384,7 @@ void G_CM_UnlinkEntity( gentity_t *gEnt )
}
}

Log::Warn( "G_CM_UnlinkEntity: not found in worldSector\n" );
Log::Warn( "G_CM_UnlinkEntity: not found in worldSector" );
}

/*
Expand Down Expand Up @@ -621,7 +621,7 @@ static void G_CM_AreaEntities_r( worldSector_t *node, areaParms_t *ap )

if ( ap->count == ap->maxcount )
{
Log::Notice( "G_CM_AreaEntities: MAXCOUNT\n" );
Log::Notice( "G_CM_AreaEntities: MAXCOUNT" );
return;
}

Expand Down
6 changes: 3 additions & 3 deletions src/sgame/sg_combat.cpp
Expand Up @@ -441,7 +441,7 @@ void G_PlayerDie( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, in
}
else if ( g_showKillerHP.Get() )
{
trap_SendServerCommand( self - g_entities, va( "print_tr %s %s %3i", QQ( N_("Your killer, $1$^*, had $2$ HP.\n") ),
trap_SendServerCommand( self - g_entities, va( "print_tr %s %s %3i", QQ( N_("Your killer, $1$^*, had $2$ HP.") ),
Quote( killerName ),
(int)std::ceil(attacker->entity->Get<HealthComponent>()->Health()) ) );
}
Expand Down Expand Up @@ -1048,8 +1048,8 @@ void G_LogDestruction( gentity_t *self, gentity_t *actor, int mod )
if ( actor->client && G_OnSameTeam( self, actor ) )
{
G_TeamCommand( G_Team( actor ),
va( "print_tr %s %s %s", mod == MOD_DECONSTRUCT ? QQ( N_("$1$ ^3DECONSTRUCTED^* by $2$\n") ) :
QQ( N_("$1$ ^3DESTROYED^* by $2$\n") ),
va( "print_tr %s %s %s", mod == MOD_DECONSTRUCT ? QQ( N_("$1$ ^3DECONSTRUCTED^* by $2$") ) :
QQ( N_("$1$ ^3DESTROYED^* by $2$") ),
Quote( BG_Buildable( self->s.modelindex )->humanName ),
Quote( actor->client->pers.netname ) ) );
}
Expand Down
10 changes: 5 additions & 5 deletions src/sgame/sg_maprotation.cpp
Expand Up @@ -749,13 +749,13 @@ void G_PrintRotations()
int i, j;
int size = sizeof( mapRotations );

Log::Notice( "Map rotations as parsed:\n" );
Log::Notice( "Map rotations as parsed:" );

for ( i = 0; i < mapRotations.numRotations; i++ )
{
mapRotation_t *mr = &mapRotations.rotations[ i ];

Log::Notice( "rotation: %s\n{", mr->name );
Log::Notice( "rotation: %s{", mr->name );

size += mr->numNodes * sizeof( mrNode_t );

Expand Down Expand Up @@ -807,20 +807,20 @@ void G_PrintCurrentRotation( gentity_t *ent )

if ( mapRotation == nullptr )
{
trap_SendServerCommand( ent - g_entities, "print_tr \"" N_("^3listrotation:^* there is no active map rotation on this server\n") "\"" );
trap_SendServerCommand( ent - g_entities, "print_tr " QQ( N_("^3listrotation:^* there is no active map rotation on this server") ) );
return;
}

if ( mapRotation->numNodes == 0 )
{
trap_SendServerCommand( ent - g_entities, "print_tr \"" N_("^3listrotation:^* there are no maps in the active map rotation\n") "\"" );
trap_SendServerCommand( ent - g_entities, "print_tr " QQ( N_("^3listrotation:^* there are no maps in the active map rotation") ) );
return;
}

trap_Cvar_VariableStringBuffer( "mapname", currentMapName, sizeof( currentMapName ) );

ADMBP_begin();
ADMBP( va( "%s:\n", mapRotation->name ) );
ADMBP( va( "%s:", mapRotation->name ) );

while ( ( node = mapRotation->nodes[ i++ ] ) )
{
Expand Down
4 changes: 2 additions & 2 deletions src/sgame/sg_momentum.cpp
Expand Up @@ -203,7 +203,7 @@ static float MomentumMod( momentum_t type )

if ( g_debugMomentum.Get() > 1 )
{
Log::Notice( "Momentum mod for %s: Base %.2f, Type %.2f, Time %.2f, Playercount %.2f → %.2f\n",
Log::Notice( "Momentum mod for %s: Base %.2f, Type %.2f, Time %.2f, Playercount %.2f → %.2f",
MomentumTypeToReason( type ), baseMod, typeMod, timeMod, playerCountMod, mod );
}

Expand Down Expand Up @@ -289,7 +289,7 @@ static float AddMomentum( momentum_t type, team_t team, float amount,
clientName = "no source";
}

Log::Notice( "Momentum: %.2f to %s (%s by %s for %s)\n",
Log::Notice( "Momentum: %.2f to %s (%s by %s for %s)",
amount, BG_TeamNamePlural( team ), amount < 0.0f ? "lost" : "earned",
clientName, MomentumTypeToReason( type ) );
}
Expand Down
4 changes: 2 additions & 2 deletions src/sgame/sg_spawn.cpp
Expand Up @@ -758,7 +758,7 @@ static void G_ParseField( const char *key, const char *rawString, gentity_t *ent
case F_SOUNDINDEX:
if ( strlen( rawString ) >= MAX_QPATH )
{
Sys::Drop( "Sound filename %s in field %s of %s exceeds MAX_QPATH\n", rawString, fieldDescriptor->name, etos( entity ) );
Sys::Drop( "Sound filename %s in field %s of %s exceeds MAX_QPATH", rawString, fieldDescriptor->name, etos( entity ) );
}

* ( int * ) entityDataField = G_SoundIndex( rawString );
Expand Down Expand Up @@ -1110,7 +1110,7 @@ static void SP_worldspawn()
{
level.warmupTime = level.matchTime + ( g_warmup.Get() * 1000 );
trap_SetConfigstring( CS_WARMUP, va( "%i", level.warmupTime ) );
G_LogPrintf( "Warmup: %i\n", g_warmup.Get() );
G_LogPrintf( "Warmup: %i", g_warmup.Get() );
}

level.timelimit = g_timelimit.Get();
Expand Down
4 changes: 2 additions & 2 deletions src/sgame/sg_spawn_mover.cpp
Expand Up @@ -1248,7 +1248,7 @@ static void reset_moverspeed( gentity_t *self, float fallbackSpeed )
float distance;

if(!fallbackSpeed)
Sys::Drop("No default speed was supplied to reset_moverspeed for entity #%i of type %s.\n", self->s.number, self->classname);
Sys::Drop("No default speed was supplied to reset_moverspeed for entity #%i of type %s.", self->s.number, self->classname);

G_ResetFloatField(&self->speed, true, self->config.speed, self->eclass->config.speed, fallbackSpeed);

Expand Down Expand Up @@ -1365,7 +1365,7 @@ static void reset_rotatorspeed( gentity_t *self, float fallbackSpeed )
float angle;

if(!fallbackSpeed)
Sys::Drop("No default speed was supplied to reset_rotatorspeed for entity #%i of type %s.\n", self->s.number, self->classname);
Sys::Drop("No default speed was supplied to reset_rotatorspeed for entity #%i of type %s.", self->s.number, self->classname);

// calculate time to reach second position from speed
VectorSubtract( self->activatedPosition, self->restingPosition, move );
Expand Down
16 changes: 8 additions & 8 deletions src/sgame/sg_svcmds.cpp
Expand Up @@ -139,9 +139,9 @@ static void Svcmd_EntityShow_f()
{
Log::Notice("%26s", vtos( selection->s.origin ) );
}
Log::Notice( "\n⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼" );
Log::Notice( "⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼" );
Log::Notice( "Classname: ^5%s^*", selection->classname );
Log::Notice( "Capabilities:%s%s%s%s%s%s%s\n",
Log::Notice( "Capabilities:%s%s%s%s%s%s%s",
selection->act ? " acts" : "",
selection->think ? " thinks" : "",
selection->pain ? " pains" : "",
Expand Down Expand Up @@ -402,12 +402,12 @@ static void Svcmd_AdmitDefeat_f()
if ( team == TEAM_ALIENS )
{
G_TeamCommand( TEAM_ALIENS, "cp \"Hivemind Link Broken\" 1" );
trap_SendServerCommand( -1, "print_tr \"" N_("Alien team has admitted defeat\n") "\"" );
trap_SendServerCommand( -1, "print_tr " QQ( N_("Alien team has admitted defeat") ) );
}
else if ( team == TEAM_HUMANS )
{
G_TeamCommand( TEAM_HUMANS, "cp \"Life Support Terminated\" 1" );
trap_SendServerCommand( -1, "print_tr \"" N_("Human team has admitted defeat\n") "\"" );
trap_SendServerCommand( -1, "print_tr " QQ( N_("Human team has admitted defeat") ) );
}
else
{
Expand Down Expand Up @@ -440,7 +440,7 @@ static void Svcmd_TeamWin_f()

static void Svcmd_Evacuation_f()
{
trap_SendServerCommand( -1, "print_tr \"" N_("Evacuation ordered\n") "\"" );
trap_SendServerCommand( -1, "print_tr " QQ( N_("Evacuation ordered") ) );
level.lastWin = TEAM_NONE;
trap_SetConfigstring( CS_WINNER, "Evacuation" );
G_notify_sensor_end( TEAM_NONE );
Expand Down Expand Up @@ -491,7 +491,7 @@ static void Svcmd_TeamMessage_f()

arg = ConcatArgs( 2 );
G_TeamCommand( team, va( "chat -1 %d %s", SAY_TEAM, Quote( arg ) ) );
G_LogPrintf( "SayTeam: -1 \"console\": %s\n", arg );
G_LogPrintf( "SayTeam: -1 \"console\": %s", arg );
}

static void Svcmd_CenterPrint_f()
Expand Down Expand Up @@ -579,7 +579,7 @@ static void Svcmd_DumpUser_f()

trap_GetUserinfo( cl - level.clients, userinfo, sizeof( userinfo ) );
info = &userinfo[ 0 ];
Log::Notice( "userinfo\n--------" );
Log::Notice( "userinfo--------" );

//Info_Print( userinfo );
while ( 1 )
Expand Down Expand Up @@ -615,7 +615,7 @@ static void Svcmd_Pr_f()
return;
}

trap_SendServerCommand( cl, va( "print %s\\\n", Quote( ConcatArgs( 2 ) ) ) );
trap_SendServerCommand( cl, va( "print %s", Quote( ConcatArgs( 2 ) ) ) );
}

static void Svcmd_PrintQueue_f()
Expand Down

0 comments on commit ab19a77

Please sign in to comment.