From 7a2577a018ef1d2e38c644e2454aefab15dd212a Mon Sep 17 00:00:00 2001 From: serpentine Date: Mon, 26 Mar 2012 03:03:21 +0000 Subject: [PATCH] Remove redundant newline characters from the end of Warning message strings. The function already adds these, so you will just end up with extraneous blank lines in the console. This was done with regex - I did check the replacements, however there's a small chance something that either things were missed or have been removed by mistake. Regex[RG] for anyone interested : '(?<=(common\s*->\s*|gameLocal\.)D?Warning\s*\(.*)(\\n|\\r)(?=\s*".*\))' git-svn-id: https://svn.thedarkmod.com/svn/darkmod_src/trunk@5361 49c82d7f-2e2a-0410-a16f-ae8f201b507f --- cm/CollisionModel_files.cpp | 2 +- framework/CVarSystem.cpp | 2 +- framework/FileSystem.cpp | 2 +- framework/I18N.cpp | 2 +- framework/Session.cpp | 4 +-- framework/async/AsyncClient.cpp | 2 +- framework/async/AsyncNetwork.cpp | 4 +-- framework/async/AsyncServer.cpp | 4 +-- game/AF.cpp | 4 +-- game/BinaryFrobMover.cpp | 4 +-- game/DifficultySettings.cpp | 4 +-- game/Entity.cpp | 36 ++++++++++----------- game/EscapePointManager.cpp | 2 +- game/FrobDoor.cpp | 2 +- game/Game_network.cpp | 2 +- game/ImageMapManager.cpp | 6 ++-- game/Inventory/Inventory.cpp | 4 +-- game/Item.cpp | 2 +- game/MaterialConverter.cpp | 12 +++---- game/MeleeWeapon.cpp | 4 +-- game/Misc.cpp | 2 +- game/ModelGenerator.cpp | 10 +++--- game/Mover.cpp | 2 +- game/MultiStateMover.cpp | 4 +-- game/Objectives/MissionData.cpp | 2 +- game/Player.cpp | 24 +++++++------- game/SEED.cpp | 32 +++++++++--------- game/SndPropLoader.cpp | 4 +-- game/StaticMulti.cpp | 4 +-- game/Target.cpp | 6 ++-- game/ai/AI.cpp | 2 +- game/ai/Conversation/Conversation.cpp | 6 ++-- game/ai/Conversation/ConversationSystem.cpp | 4 +-- game/ai/EAS/EAS.cpp | 2 +- game/ai/MovementSubsystem.cpp | 2 +- game/ai/States/ConversationState.cpp | 2 +- game/ai/Tasks/PathAnimTask.cpp | 2 +- game/ai/Tasks/PathCycleAnimTask.cpp | 2 +- game/ai/Tasks/PlayAnimationTask.cpp | 2 +- game/anim/Anim_Blend.cpp | 4 +-- game/anim/Anim_Import.cpp | 2 +- game/decltdm_matinfo.cpp | 2 +- game/gamesys/SaveGame.cpp | 2 +- game/gamesys/SysCmds.cpp | 14 ++++---- idlib/MapFile.cpp | 2 +- idlib/Str.cpp | 2 +- renderer/Image_load.cpp | 4 +-- renderer/Material.cpp | 4 +-- sys/linux/sound_alsa.cpp | 2 +- sys/osx/macosx_sound.cpp | 2 +- sys/posix/posix_net.cpp | 2 +- ui/GuiScript.cpp | 2 +- ui/Window.cpp | 2 +- 53 files changed, 132 insertions(+), 132 deletions(-) diff --git a/cm/CollisionModel_files.cpp b/cm/CollisionModel_files.cpp index e7719a3ad..91773c1bd 100644 --- a/cm/CollisionModel_files.cpp +++ b/cm/CollisionModel_files.cpp @@ -236,7 +236,7 @@ void idCollisionModelManagerLocal::WriteCollisionModelsToFile( const char *filen // _D3XP was saving to fs_cdpath TODO: Check this is still relevant fp = fileSystem->OpenFileWrite( name, "fs_devpath" ); if ( !fp ) { - common->Warning( "idCollisionModelManagerLocal::WriteCollisionModelsToFile: Error opening file %s\n", name.c_str() ); + common->Warning( "idCollisionModelManagerLocal::WriteCollisionModelsToFile: Error opening file %s", name.c_str() ); return; } diff --git a/framework/CVarSystem.cpp b/framework/CVarSystem.cpp index d0feb11f9..dd24f9656 100644 --- a/framework/CVarSystem.cpp +++ b/framework/CVarSystem.cpp @@ -211,7 +211,7 @@ void idInternalCVar::Update( const idCVar *cvar ) { if ( resetString.Length() == 0 ) { resetString = cvar->GetString(); } else if ( cvar->GetString()[0] && resetString.Cmp( cvar->GetString() ) != 0 ) { - common->Warning( "cvar \"%s\" given initial values: \"%s\" and \"%s\"\n", nameString.c_str(), resetString.c_str(), cvar->GetString() ); + common->Warning( "cvar \"%s\" given initial values: \"%s\" and \"%s\"", nameString.c_str(), resetString.c_str(), cvar->GetString() ); } } diff --git a/framework/FileSystem.cpp b/framework/FileSystem.cpp index 0ae25d1aa..703c383b4 100644 --- a/framework/FileSystem.cpp +++ b/framework/FileSystem.cpp @@ -1258,7 +1258,7 @@ int idFileSystemLocal::AddZipFile( const char *path ) { fullpath.AppendPath( path ); pak = LoadZipFile( fullpath ); if ( !pak ) { - common->Warning( "AddZipFile %s failed\n", path ); + common->Warning( "AddZipFile %s failed", path ); return 0; } diff --git a/framework/I18N.cpp b/framework/I18N.cpp index b75aabe2a..546163f87 100644 --- a/framework/I18N.cpp +++ b/framework/I18N.cpp @@ -342,7 +342,7 @@ int I18NLocal::LoadCharacterMapping( idStr& lang ) { break; } // add the two numbers - // common->Warning("got '%s' '%s'\n", tok.c_str(), tok2.c_str() ); + // common->Warning("got '%s' '%s'", tok.c_str(), tok2.c_str() ); m_Remap.Append( (char) tok.GetIntValue() ); m_Remap.Append( (char) tok2.GetIntValue() ); // common->Printf("I18N: Mapping %i (0x%02x) to %i (0x%02x)\n", tok.GetIntValue(), tok.GetIntValue(), tok2.GetIntValue(), tok2.GetIntValue() ); diff --git a/framework/Session.cpp b/framework/Session.cpp index b7c54c094..f5988f997 100644 --- a/framework/Session.cpp +++ b/framework/Session.cpp @@ -1735,7 +1735,7 @@ bool idSessionLocal::SaveGame( const char *saveName, bool autosave ) { // Open savegame file idFile *fileOut = fileSystem->OpenFileWrite( gameFile ); if ( fileOut == NULL ) { - common->Warning( "Failed to open save file '%s'\n", gameFile.c_str() ); + common->Warning( "Failed to open save file '%s'", gameFile.c_str() ); if ( pauseWorld ) { soundSystem->SetPlayingSoundWorld( pauseWorld ); pauseWorld->UnPause(); @@ -1781,7 +1781,7 @@ bool idSessionLocal::SaveGame( const char *saveName, bool autosave ) { // the unclean save name on line 1, map name on line 2, screenshot on line 3 idFile *fileDesc = fileSystem->OpenFileWrite( descriptionFile ); if ( fileDesc == NULL ) { - common->Warning( "Failed to open description file '%s'\n", descriptionFile.c_str() ); + common->Warning( "Failed to open description file '%s'", descriptionFile.c_str() ); if ( pauseWorld ) { soundSystem->SetPlayingSoundWorld( pauseWorld ); pauseWorld->UnPause(); diff --git a/framework/async/AsyncClient.cpp b/framework/async/AsyncClient.cpp index cacf1ac9f..562a94fa2 100644 --- a/framework/async/AsyncClient.cpp +++ b/framework/async/AsyncClient.cpp @@ -1359,7 +1359,7 @@ void idAsyncClient::ConnectionlessMessage( const netadr_t from, const idBitMsg & if ( idStr::Icmp( string, "authrequired" ) == 0 ) { // server telling us that he's expecting an auth mode connect, just in case we're trying to connect in LAN mode if ( idAsyncNetwork::LANServer.GetBool() ) { - common->Warning( "server %s requests master authorization for this client. Turning off LAN mode\n", Sys_NetAdrToString( from ) ); + common->Warning( "server %s requests master authorization for this client. Turning off LAN mode", Sys_NetAdrToString( from ) ); idAsyncNetwork::LANServer.SetBool( false ); } } diff --git a/framework/async/AsyncNetwork.cpp b/framework/async/AsyncNetwork.cpp index 91f9f6877..11d267764 100644 --- a/framework/async/AsyncNetwork.cpp +++ b/framework/async/AsyncNetwork.cpp @@ -472,11 +472,11 @@ idAsyncNetwork::UpdateUI_f */ void idAsyncNetwork::UpdateUI_f( const idCmdArgs &args ) { if ( args.Argc() != 2 ) { - common->Warning( "idAsyncNetwork::UpdateUI_f: wrong arguments\n" ); + common->Warning( "idAsyncNetwork::UpdateUI_f: wrong arguments" ); return; } if ( !server.IsActive() ) { - common->Warning( "idAsyncNetwork::UpdateUI_f: server is not active\n" ); + common->Warning( "idAsyncNetwork::UpdateUI_f: server is not active" ); return; } int clientNum = atoi( args.Args( 1 ) ); diff --git a/framework/async/AsyncServer.cpp b/framework/async/AsyncServer.cpp index d244af144..4426137a0 100644 --- a/framework/async/AsyncServer.cpp +++ b/framework/async/AsyncServer.cpp @@ -907,7 +907,7 @@ void idAsyncServer::UpdateUI( int clientNum ) { const idDict *info = game->GetUserInfo( clientNum ); if ( !info ) { - common->Warning( "idAsyncServer::UpdateUI: no info from game\n" ); + common->Warning( "idAsyncServer::UpdateUI: no info from game" ); return; } @@ -1747,7 +1747,7 @@ bool idAsyncServer::VerifyChecksumMessage( int clientNum, const netadr_t *from, checksums[ numChecksums++ ] = i; // just to make sure a broken client doesn't crash us if ( numChecksums >= MAX_PURE_PAKS ) { - common->Warning( "MAX_PURE_PAKS ( %d ) exceeded\n", MAX_PURE_PAKS ); + common->Warning( "MAX_PURE_PAKS ( %d ) exceeded", MAX_PURE_PAKS ); sprintf( reply, "#str_07144" ); return false; } diff --git a/game/AF.cpp b/game/AF.cpp index 80f866582..7d64816cb 100644 --- a/game/AF.cpp +++ b/game/AF.cpp @@ -921,7 +921,7 @@ bool idAF::Load( idEntity *ent, const char *fileName ) { physicsObj.SetSelf( self ); if ( animator == NULL ) { - gameLocal.Warning( "Couldn't load af '%s' for entity '%s' at (%s): NULL animator\n", name.c_str(), ent->name.c_str(), ent->GetPhysics()->GetOrigin().ToString(0) ); + gameLocal.Warning( "Couldn't load af '%s' for entity '%s' at (%s): NULL animator", name.c_str(), ent->name.c_str(), ent->GetPhysics()->GetOrigin().ToString(0) ); return false; } @@ -930,7 +930,7 @@ bool idAF::Load( idEntity *ent, const char *fileName ) { file = static_cast( declManager->FindType( DECL_AF, name ) ); if ( !file ) { - gameLocal.Warning( "Couldn't load af '%s' for entity '%s' at (%s)\n", name.c_str(), ent->name.c_str(), ent->GetPhysics()->GetOrigin().ToString(0) ); + gameLocal.Warning( "Couldn't load af '%s' for entity '%s' at (%s)", name.c_str(), ent->name.c_str(), ent->GetPhysics()->GetOrigin().ToString(0) ); return false; } diff --git a/game/BinaryFrobMover.cpp b/game/BinaryFrobMover.cpp index 815a2a54c..222b9c14e 100644 --- a/game/BinaryFrobMover.cpp +++ b/game/BinaryFrobMover.cpp @@ -332,7 +332,7 @@ void CBinaryFrobMover::PostSpawn() } else { - gameLocal.Warning("Mover '%s' has start_rotate set, but rotation angles are zero.\r", name.c_str()); + gameLocal.Warning("Mover '%s' has start_rotate set, but rotation angles are zero.", name.c_str()); DM_LOG(LC_SYSTEM, LT_ERROR)LOGSTRING("[%s] has start_rotate set, but rotation angles are zero.\r", name.c_str()); } } @@ -352,7 +352,7 @@ void CBinaryFrobMover::PostSpawn() } else { - gameLocal.Warning("Mover '%s' has start_position set, but translation is zero.\r", name.c_str()); + gameLocal.Warning("Mover '%s' has start_position set, but translation is zero.", name.c_str()); DM_LOG(LC_SYSTEM, LT_ERROR)LOGSTRING("[%s] has partial translation set, but translation is zero?\r", name.c_str()); } } diff --git a/game/DifficultySettings.cpp b/game/DifficultySettings.cpp index 92188c67e..741577e8a 100644 --- a/game/DifficultySettings.cpp +++ b/game/DifficultySettings.cpp @@ -175,7 +175,7 @@ idList Setting::ParseSettingsFromDict(const idDict& dict, int level) } else { - gameLocal.Warning("Found invalid difficulty settings index: %s.\r", keyVal->GetKey().c_str()); + gameLocal.Warning("Found invalid difficulty settings index: %s.", keyVal->GetKey().c_str()); DM_LOG(LC_DIFFICULTY, LT_ERROR)LOGSTRING("Found invalid difficulty settings index: %s.\r", keyVal->GetKey().c_str()); } } @@ -565,7 +565,7 @@ void CVARDifficultySettings::LoadFromEntityDef(const idDict& dict) } else { - gameLocal.Warning("Found invalid cvar difficulty settings index: %s.\r", keyVal->GetKey().c_str()); + gameLocal.Warning("Found invalid cvar difficulty settings index: %s.", keyVal->GetKey().c_str()); DM_LOG(LC_DIFFICULTY, LT_ERROR)LOGSTRING("Found invalid cvar difficulty settings index: %s.\r", keyVal->GetKey().c_str()); } } diff --git a/game/Entity.cpp b/game/Entity.cpp index 815eabd6b..9598c74fa 100644 --- a/game/Entity.cpp +++ b/game/Entity.cpp @@ -933,7 +933,7 @@ lod_handle idEntity::ParseLODSpawnargs( const idDict* dict, const float fRandom) if (m_LOD->fLODFadeOutRange < 0) { - gameLocal.Warning (" %s: lod_fadeout_range must be >= 0 but is %f. Ignoring it.\n", GetName(), m_LOD->fLODFadeOutRange); + gameLocal.Warning (" %s: lod_fadeout_range must be >= 0 but is %f. Ignoring it.", GetName(), m_LOD->fLODFadeOutRange); m_LOD->fLODFadeOutRange = 0.0f; } else @@ -947,12 +947,12 @@ lod_handle idEntity::ParseLODSpawnargs( const idDict* dict, const float fRandom) if (m_LOD->fLODFadeInRange < 0) { - gameLocal.Warning (" %s: lod_fadein_range must be >= 0 but is %f. Ignoring it.\n", GetName(), m_LOD->fLODFadeInRange); + gameLocal.Warning (" %s: lod_fadein_range must be >= 0 but is %f. Ignoring it.", GetName(), m_LOD->fLODFadeInRange); m_LOD->fLODFadeInRange = 0.0f; } else if (m_LOD->fLODFadeInRange > 0 && m_LOD->fLODFadeInRange > m_LOD->DistLODSq[1]) { - gameLocal.Warning (" %s: lod_fadein_range must be <= lod_1_distance (%f) 0 but is %f. Ignoring it.\n", GetName(), m_LOD->DistLODSq[1], m_LOD->fLODFadeInRange); + gameLocal.Warning (" %s: lod_fadein_range must be <= lod_1_distance (%f) 0 but is %f. Ignoring it.", GetName(), m_LOD->DistLODSq[1], m_LOD->fLODFadeInRange); m_LOD->fLODFadeOutRange = 0.0f; } else @@ -1096,7 +1096,7 @@ void idEntity::Spawn( void ) if ( m_overlays.createOverlay( 0, OVERLAYS_MIN_HANDLE + i ) >= OVERLAYS_MIN_HANDLE ) m_overlays.setGui( OVERLAYS_MIN_HANDLE + i, renderEntity.gui[ i ] ); else - gameLocal.Warning( "Unable to create overlay for renderentity GUI: %d\n", OVERLAYS_MIN_HANDLE + i ); + gameLocal.Warning( "Unable to create overlay for renderentity GUI: %d", OVERLAYS_MIN_HANDLE + i ); } fl.solidForTeam = spawnArgs.GetBool( "solidForTeam", "0" ); @@ -7320,10 +7320,10 @@ void idEntity::Event_RestorePosition( void ) { } if ( part->GetPhysics()->IsType( idPhysics_Parametric::Type ) ) { if ( static_cast(part->GetPhysics())->IsPusher() ) { - gameLocal.Warning( "teleported '%s' which has the pushing mover '%s' bound to it\n", GetName(), part->GetName() ); + gameLocal.Warning( "teleported '%s' which has the pushing mover '%s' bound to it", GetName(), part->GetName() ); } } else if ( part->GetPhysics()->IsType( idPhysics_AF::Type ) ) { - gameLocal.Warning( "teleported '%s' which has the articulated figure '%s' bound to it\n", GetName(), part->GetName() ); + gameLocal.Warning( "teleported '%s' which has the articulated figure '%s' bound to it", GetName(), part->GetName() ); } } } @@ -9724,12 +9724,12 @@ if it wanted to.) */ void idEntity::Event_SetGui( int handle, const char *guiFile ) { if ( !uiManager->CheckGui(guiFile) ) { - gameLocal.Warning( "Unable to load GUI file: %s\n", guiFile ); + gameLocal.Warning( "Unable to load GUI file: %s", guiFile ); goto Quit; } if ( !m_overlays.exists( handle ) ) { - gameLocal.Warning( "Non-existant GUI handle: %d\n", handle ); + gameLocal.Warning( "Non-existant GUI handle: %d", handle ); goto Quit; } @@ -9768,7 +9768,7 @@ void idEntity::Event_SetGui( int handle, const char *guiFile ) { assert( result ); } else { - gameLocal.Warning( "Cannot call setGui() on external handle: %d\n", handle ); + gameLocal.Warning( "Cannot call setGui() on external handle: %d", handle ); } Quit: @@ -9979,13 +9979,13 @@ void idEntity::Event_SetGuiStringFromKey( int handle, const char *key, idEntity { if(!src) { - gameLocal.Warning( "Unable to get key, since the source entity was NULL.\n" ); + gameLocal.Warning( "Unable to get key, since the source entity was NULL." ); return; } if(!m_overlays.exists(handle)) { - gameLocal.Warning( "Non-existant GUI handle: %d\n", handle ); + gameLocal.Warning( "Non-existant GUI handle: %d", handle ); return; } @@ -10070,7 +10070,7 @@ void idEntity::Event_LoadExternalData( const char *xdFile, const char* prefix ) } else { - gameLocal.Warning("Non-existant xdata declaration: %s\n", xdFile); + gameLocal.Warning("Non-existant xdata declaration: %s", xdFile); idThread::ReturnInt( 0 ); } } @@ -10144,7 +10144,7 @@ void idEntity::Attach( idEntity *ent, const char *PosName, const char *AttName ) // The following is the old system and will be phased out else { - //gameLocal.Warning("%s is attaching %s using the deprecated attachment system.\n", name.c_str(), ent->name.c_str()); + //gameLocal.Warning("%s is attaching %s using the deprecated attachment system.", name.c_str(), ent->name.c_str()); angleOffset = ent->spawnArgs.GetAngles( "angles" ); originOffset = ent->spawnArgs.GetVector( "origin" ); } @@ -11282,7 +11282,7 @@ void idEntity::DestroyOverlay(int handle) gui->Activate( false, gameLocal.time ); m_overlays.destroyOverlay( handle ); } else { - gameLocal.Warning( "Cannot destroy HUD.\n" ); + gameLocal.Warning( "Cannot destroy HUD." ); } } @@ -11550,12 +11550,12 @@ void idEntity::Event_GetLightInPVS( const float lightFalloff, const float lightD dist = dist3.Length(); } // divide by dist - //gameLocal.Warning(" dist %0.2f, falloff %0.0f\n", dist, lightFalloff ); + //gameLocal.Warning(" dist %0.2f, falloff %0.0f", dist, lightFalloff ); dist /= dist_scaling; - //gameLocal.Warning(" dist is now %0.2f\n", dist ); - //gameLocal.Warning(" local_light %s\n", local_light.ToString() ); + //gameLocal.Warning(" dist is now %0.2f", dist ); + //gameLocal.Warning(" local_light %s", local_light.ToString() ); local_light /= dist; - //gameLocal.Warning(" local_light %s\n", local_light.ToString() ); + //gameLocal.Warning(" local_light %s", local_light.ToString() ); } sum += local_light; } diff --git a/game/EscapePointManager.cpp b/game/EscapePointManager.cpp index b235aa475..575982c98 100644 --- a/game/EscapePointManager.cpp +++ b/game/EscapePointManager.cpp @@ -248,7 +248,7 @@ EscapeGoal CEscapePointManager::GetEscapeGoal(const EscapeConditions& conditions if (escapePoints.Num() == 0) { - gameLocal.Warning("No escape point information available for the given aas type in map!\n"); + gameLocal.Warning("No escape point information available for the given aas type in map!"); goal.escapePointId = -1; goal.distance = -1; return goal; diff --git a/game/FrobDoor.cpp b/game/FrobDoor.cpp index c0665f3fb..b1ff50bfe 100644 --- a/game/FrobDoor.cpp +++ b/game/FrobDoor.cpp @@ -1036,7 +1036,7 @@ int CFrobDoor::FrobMoverStartSound(const char* soundName) if (sound.IsEmpty()) { - gameLocal.Warning("Cannot find sound %s on door %s\r", soundName, name.c_str()); + gameLocal.Warning("Cannot find sound %s on door %s", soundName, name.c_str()); return 0; } diff --git a/game/Game_network.cpp b/game/Game_network.cpp index 76bf8e2c1..295d76aed 100644 --- a/game/Game_network.cpp +++ b/game/Game_network.cpp @@ -1042,7 +1042,7 @@ void idGameLocal::ClientReadSnapshot( int clientNum, int sequence, const int gam if ( i < MAX_CLIENTS && ent ) { // SPAWN_PLAYER should be taking care of spawning the entity with the right spawnId - common->Warning( "ClientReadSnapshot: recycling client entity %d\n", i ); + common->Warning( "ClientReadSnapshot: recycling client entity %d", i ); } delete ent; diff --git a/game/ImageMapManager.cpp b/game/ImageMapManager.cpp index 42957197c..7120019fe 100644 --- a/game/ImageMapManager.cpp +++ b/game/ImageMapManager.cpp @@ -165,16 +165,16 @@ int ImageMapManager::GetImageMap( idStr name ) { idFile *fl = NULL; if((fl = fileSystem->OpenFileRead(mapName)) == NULL) { - //gameLocal.Warning("ImageMapManager: Could not find %s, trying .png next.\n", mapName.c_str() ); + //gameLocal.Warning("ImageMapManager: Could not find %s, trying .png next.", mapName.c_str() ); idStr m = mapName + ".png"; if((fl = fileSystem->OpenFileRead(m)) == NULL) { - //gameLocal.Warning("ImageMapManager: Could not find %s, trying .tga next.\n", m.c_str() ); + //gameLocal.Warning("ImageMapManager: Could not find %s, trying .tga next.", m.c_str() ); // can't find PNG, try TGA m = mapName + ".tga"; if((fl = fileSystem->OpenFileRead(m)) == NULL) { - // gameLocal.Warning("ImageMapManager: Could not find %s, trying .jpg next.\n", m.c_str() ); + // gameLocal.Warning("ImageMapManager: Could not find %s, trying .jpg next.", m.c_str() ); // can't find TGA, try JPG as last resort mapName += ".jpg"; if((fl = fileSystem->OpenFileRead(mapName)) == NULL) diff --git a/game/Inventory/Inventory.cpp b/game/Inventory/Inventory.cpp index c9e6c1e83..caf08de32 100644 --- a/game/Inventory/Inventory.cpp +++ b/game/Inventory/Inventory.cpp @@ -749,7 +749,7 @@ bool CInventory::ReplaceItem(idEntity* oldItemEnt, idEntity* newItemEnt) if (oldItem == NULL) { - gameLocal.Warning("Could not find old inventory item for %s\n", oldItemEnt->name.c_str()); + gameLocal.Warning("Could not find old inventory item for %s", oldItemEnt->name.c_str()); DM_LOG(LC_INVENTORY, LT_DEBUG)LOGSTRING("Could not find old inventory item for %s\n", oldItemEnt->name.c_str()); return false; } @@ -991,7 +991,7 @@ CInventoryItemPtr CInventory::ValidateAmmo(idEntity* ent, const bool gotFromShop if (weaponName.IsEmpty()) { DM_LOG(LC_INVENTORY, LT_ERROR)LOGSTRING("Could not find 'inv_weapon_name' on item %s.\r", ent->name.c_str()); - gameLocal.Warning("Could not find 'inv_weapon_name' on item %s.\r", ent->name.c_str()); + gameLocal.Warning("Could not find 'inv_weapon_name' on item %s.", ent->name.c_str()); return returnValue; } diff --git a/game/Item.cpp b/game/Item.cpp index 3411c808d..df34305ee 100644 --- a/game/Item.cpp +++ b/game/Item.cpp @@ -1046,7 +1046,7 @@ void idMoveableItem::DropItems( idAnimatedEntity *ent, const char *type, idList jointName = ent->spawnArgs.GetString( key ); joint = ent->GetAnimator()->GetJointHandle( jointName ); if ( !ent->GetJointWorldTransform( joint, gameLocal.time, origin, axis ) ) { - gameLocal.Warning( "%s refers to invalid joint '%s' on entity '%s'\n", key.c_str(), jointName, ent->name.c_str() ); + gameLocal.Warning( "%s refers to invalid joint '%s' on entity '%s'", key.c_str(), jointName, ent->name.c_str() ); origin = ent->GetPhysics()->GetOrigin(); axis = ent->GetPhysics()->GetAxis(); } diff --git a/game/MaterialConverter.cpp b/game/MaterialConverter.cpp index 738d2b2ac..0a9066d8f 100644 --- a/game/MaterialConverter.cpp +++ b/game/MaterialConverter.cpp @@ -177,7 +177,7 @@ void MaterialParsingHelper::GetMaterialStageInfo( const char* a_strMatStageName, { if( !a_lexSource.ReadToken( &tknMatStage ) ) { - gameLocal.Warning( "Unexpected end of material when trying to obtain scale. \n"); + gameLocal.Warning( "Unexpected end of material when trying to obtain scale. "); break; } // Not using expectTokenString anymore since "Map" is treated as different token than "map". @@ -241,7 +241,7 @@ bool MaterialParsingHelper::FindBlockContainingWords( const char *a_text, std:: if( uiSearchIndex < 0 ) { - // gameLocal.Warning( " Could not find search word %s\n", (*iter).c_str() ); + // gameLocal.Warning( " Could not find search word %s", (*iter).c_str() ); return false; } @@ -252,7 +252,7 @@ bool MaterialParsingHelper::FindBlockContainingWords( const char *a_text, std:: { if( uiSearchIndex != uiSearchOffset ) { - // gameLocal.Warning( " Could not find search word %s in the expected order\n", (*iter).c_str() ); + // gameLocal.Warning( " Could not find search word %s in the expected order", (*iter).c_str() ); //Start the search from the first word again, since all of the search words are important. bAreAllWordsFound = false; @@ -311,11 +311,11 @@ bool MaterialParsingHelper::FindBlockContainingWords( const char *a_text, std:: return true; } } - // gameLocal.Warning( " Block start found:%d Block End Found:%d, Returning false.\n", (int)bIsStartOffsetFound, (int)bIsEndOffsetFound ); + // gameLocal.Warning( " Block start found:%d Block End Found:%d, Returning false.", (int)bIsStartOffsetFound, (int)bIsEndOffsetFound ); } // if( !bAreAllWordsFound ) - // gameLocal.Warning( " Returning false since given words can't be found in the exact given order.\n" ); + // gameLocal.Warning( " Returning false since given words can't be found in the exact given order." ); return false; } @@ -711,7 +711,7 @@ eMaterialConversionStatus MaterialConverter::ConvertMaterial( idMaterial *a_pMat } else { - gameLocal.Warning( "Could not determine end of the material block. Skipping this material.\n" ); + gameLocal.Warning( "Could not determine end of the material block. Skipping this material." ); // a_pMaterial->Invalidate(); // a_pMaterial->FreeData(); return eMaterialConversionStatus_Skipped_CouldNotFindEndOfBlock; diff --git a/game/MeleeWeapon.cpp b/game/MeleeWeapon.cpp index 8430c47fd..dc0d2d9fa 100644 --- a/game/MeleeWeapon.cpp +++ b/game/MeleeWeapon.cpp @@ -159,7 +159,7 @@ void CMeleeWeapon::ActivateAttack( idActor *ActOwner, const char *AttName ) if( (key = spawnArgs.FindKey(va("att_type_%s", AttName))) == NULL ) { DM_LOG(LC_WEAPON, LT_WARNING)LOGSTRING("Did not find attack %s on melee weapon %s\r", AttName, name.c_str()); - gameLocal.Warning("Invalid attack name %s on weapon entity %s\n", AttName, name.c_str() ); + gameLocal.Warning("Invalid attack name %s on weapon entity %s", AttName, name.c_str() ); return; } @@ -375,7 +375,7 @@ void CMeleeWeapon::ActivateParry( idActor *ActOwner, const char *ParryName ) } else { - gameLocal.Warning("Invalid parry name %s on weapon entity %s\n", ParryName, name.c_str() ); + gameLocal.Warning("Invalid parry name %s on weapon entity %s", ParryName, name.c_str() ); } } diff --git a/game/Misc.cpp b/game/Misc.cpp index 5424cbcf3..d9fdc8b8f 100644 --- a/game/Misc.cpp +++ b/game/Misc.cpp @@ -148,7 +148,7 @@ void idPlayerStart::Event_TeleportStage( idEntity *_player ) { if ( !_player->IsType( idPlayer::Type ) ) { - common->Warning( "idPlayerStart::Event_TeleportStage: entity is not an idPlayer\n" ); + common->Warning( "idPlayerStart::Event_TeleportStage: entity is not an idPlayer" ); return; diff --git a/game/ModelGenerator.cpp b/game/ModelGenerator.cpp index db2bfecba..1862b2656 100644 --- a/game/ModelGenerator.cpp +++ b/game/ModelGenerator.cpp @@ -628,7 +628,7 @@ idRenderModel* CModelGenerator::DuplicateModel (const idRenderModel* source, con needScale = true; } - gameLocal.Warning("Source with %i surfaces. snapshot %s, scaling: %s, needFinish: %s\n", numSurfaces, snapshotName, needScale ? "yes" : "no", needFinish ? "yes" : "no"); + gameLocal.Warning("Source with %i surfaces. snapshot %s, scaling: %s, needFinish: %s", numSurfaces, snapshotName, needScale ? "yes" : "no", needFinish ? "yes" : "no"); #ifdef M_DEBUG #endif @@ -662,7 +662,7 @@ idRenderModel* CModelGenerator::DuplicateModel (const idRenderModel* source, con // for each needed surface for (int i = 0; i < numSurfaces; i++) { - //gameLocal.Warning("Duplicating surface %i.\n", i); + //gameLocal.Warning("Duplicating surface %i.", i); surf = source->Surface( i ); // if we need to call FinishSurface() and this is a backside, skip it @@ -689,7 +689,7 @@ idRenderModel* CModelGenerator::DuplicateModel (const idRenderModel* source, con // copy the material newSurf.shader = surf->shader; - //gameLocal.Warning("Duplicating %i verts and %i indexes.\n", surf->geometry->numVerts, surf->geometry->numIndexes ); + //gameLocal.Warning("Duplicating %i verts and %i indexes.", surf->geometry->numVerts, surf->geometry->numIndexes ); newSurf.geometry = hModel->AllocSurfaceTriangles( numVerts, numIndexes ); @@ -1229,7 +1229,7 @@ idRenderModel * CModelGenerator::DuplicateLODModels (const idListNumSurfaces(); for (int s = 0; s < numSurfaces; s++) { - //gameLocal.Warning("At surface %i of stage %i at offset %i\n", s, lod, o); + //gameLocal.Warning("At surface %i of stage %i at offset %i", s, lod, o); surf = source->Surface( s ); if (!surf) { continue; } @@ -1245,7 +1245,7 @@ idRenderModel * CModelGenerator::DuplicateLODModels (const idListWarning( "Invalid spline entity during restore\n" ); + common->Warning( "Invalid spline entity during restore" ); return; } diff --git a/game/MultiStateMover.cpp b/game/MultiStateMover.cpp index ab1804c63..9ec88c8c4 100644 --- a/game/MultiStateMover.cpp +++ b/game/MultiStateMover.cpp @@ -64,13 +64,13 @@ void CMultiStateMover::FindPositionEntities() idStr positionName; if (!moverPos->spawnArgs.GetString("position", "", positionName) || positionName.IsEmpty()) { - gameLocal.Warning("'position' spawnarg on %s is missing.\n", moverPos->name.c_str()); + gameLocal.Warning("'position' spawnarg on %s is missing.", moverPos->name.c_str()); continue; } if (GetPositionInfoIndex(positionName) != -1) { - gameLocal.Warning("Multiple positions with name %s defined for %s.\n", positionName.c_str(), name.c_str()); + gameLocal.Warning("Multiple positions with name %s defined for %s.", positionName.c_str(), name.c_str()); continue; } diff --git a/game/Objectives/MissionData.cpp b/game/Objectives/MissionData.cpp index 754919981..ed7f598bc 100644 --- a/game/Objectives/MissionData.cpp +++ b/game/Objectives/MissionData.cpp @@ -2390,7 +2390,7 @@ void CMissionData::ClearGUIState() void CMissionData::UpdateStatisticsGUI(idUserInterface* gui, const idStr& listDefName) { if (gui == NULL) { - gameLocal.Warning("Can't update statistics GUI, invalid handle.\n"); + gameLocal.Warning("Can't update statistics GUI, invalid handle."); return; // invalid handle, do nothing } diff --git a/game/Player.cpp b/game/Player.cpp index f5263eef0..64a3a7948 100644 --- a/game/Player.cpp +++ b/game/Player.cpp @@ -883,7 +883,7 @@ void idPlayer::Spawn( void ) if ( m_overlays.createOverlay( 0, LAYER_MAIN_HUD ) >= OVERLAYS_MIN_HANDLE ) m_overlays.setGui( OVERLAYS_MIN_HANDLE , hud ); else - gameLocal.Warning( "Unable to create overlay for HUD.\n" ); + gameLocal.Warning( "Unable to create overlay for HUD." ); SetLastHitTime( 0 ); @@ -2172,7 +2172,7 @@ void idPlayer::Restore( idRestoreGame *savefile ) { if ( m_overlays.isExternal( OVERLAYS_MIN_HANDLE ) ) m_overlays.setGui( OVERLAYS_MIN_HANDLE, hud ); else - gameLocal.Warning( "Unable to relink HUD to overlay system.\n" ); + gameLocal.Warning( "Unable to relink HUD to overlay system." ); } /* @@ -6735,7 +6735,7 @@ void idPlayer::UpdateUnderWaterEffects() { gameLocal.Printf( "UNDERWATER: After water check overlay is %s\n", overlay.c_str() ); } if (overlay.IsEmpty()) { // If the overlay string is empty it has failed to find the GUI on the entity, so give warning - gameLocal.Warning( "UNDERWATER: water check overlay failed, check key/val pairs\n" ); + gameLocal.Warning( "UNDERWATER: water check overlay failed, check key/val pairs" ); } else if (!overlay.IsEmpty()) { underWaterGUIHandle = CreateOverlay(overlay.c_str(), LAYER_UNDERWATER); @@ -8892,7 +8892,7 @@ void idPlayer::ReadFromSnapshot( const idBitMsgDelta &msg ) { AI_PAIN = Pain( NULL, NULL, oldHealth - health, lastDamageDir, lastDamageLocation, &def->dict ); lastDmgTime = gameLocal.time; } else { - common->Warning( "NET: no damage def for damage feedback '%d'\n", lastDamageDef ); + common->Warning( "NET: no damage def for damage feedback '%d'", lastDamageDef ); } } } else if ( health > oldHealth && !stateHitch ) { @@ -10033,12 +10033,12 @@ idPlayer::Event_SetGui */ void idPlayer::Event_SetGui( int handle, const char *guiFile ) { if ( !uiManager->CheckGui(guiFile) ) { - gameLocal.Warning( "Unable to load GUI file: %s\n", guiFile ); + gameLocal.Warning( "Unable to load GUI file: %s", guiFile ); goto Quit; } if ( !m_overlays.exists( handle ) ) { - gameLocal.Warning( "Non-existant GUI handle: %d\n", handle ); + gameLocal.Warning( "Non-existant GUI handle: %d", handle ); goto Quit; } @@ -10071,11 +10071,11 @@ void idPlayer::Event_SetGui( int handle, const char *guiFile ) { // Let's set a good default value for whether or not the overlay is interactive. m_overlays.setInteractive( handle, gui->IsInteractive() ); } else { - gameLocal.Warning( "Unknown error: Unable to load GUI into overlay.\n" ); + gameLocal.Warning( "Unknown error: Unable to load GUI into overlay." ); } } else { - gameLocal.Warning( "Cannot call setGui() on external handle: %d\n", handle ); + gameLocal.Warning( "Cannot call setGui() on external handle: %d", handle ); } Quit: @@ -10488,7 +10488,7 @@ void idPlayer::SetImmobilization( const char *source, int type ) } else { - gameLocal.Warning( "source was empty; no immobilization set\n" ); + gameLocal.Warning( "source was empty; no immobilization set" ); } } @@ -10515,7 +10515,7 @@ void idPlayer::SetHinderance( const char *source, float mCap, float aCap ) } else { - gameLocal.Warning( "source was empty; no hinderance set\n" ); + gameLocal.Warning( "source was empty; no hinderance set" ); } } @@ -10541,7 +10541,7 @@ void idPlayer::SetTurnHinderance( const char *source, float mCap, float aCap ) } else { - gameLocal.Warning( "source was empty; no turn hinderance set\n" ); + gameLocal.Warning( "source was empty; no turn hinderance set" ); } } @@ -10597,7 +10597,7 @@ void idPlayer::SetJumpHinderance( const char *source, float mCap, float aCap ) } else { - gameLocal.Warning( "source was empty; no jump hinderance set\n" ); + gameLocal.Warning( "source was empty; no jump hinderance set" ); } } diff --git a/game/SEED.cpp b/game/SEED.cpp index f5da05c2d..6bb9b19ac 100644 --- a/game/SEED.cpp +++ b/game/SEED.cpp @@ -171,7 +171,7 @@ Seed::~Seed */ Seed::~Seed(void) { - //gameLocal.Warning ("SEED %s: Shutdown.\n", GetName() ); + //gameLocal.Warning ("SEED %s: Shutdown.", GetName() ); ClearClasses(); } /* @@ -928,7 +928,7 @@ int Seed::ParseFalloff(idDict const *dict, idStr defaultName, idStr defaultFacto if (rc == 0) { - gameLocal.Warning("SEED %s: Wrong falloff %s, expected one of none, cutoff, power, root, linear or func.\n", GetName(), falloff.c_str() ); + gameLocal.Warning("SEED %s: Wrong falloff %s, expected one of none, cutoff, power, root, linear or func.", GetName(), falloff.c_str() ); return 0; } @@ -936,7 +936,7 @@ int Seed::ParseFalloff(idDict const *dict, idStr defaultName, idStr defaultFacto *func_a = dict->GetFloat( "seed_func_a", defaultFactor ); if (*func_a < 2.0f) { - gameLocal.Warning( "SEED %s: Expect seed_func_a >= 2 when falloff is %s.\n", GetName(), falloff.c_str()); + gameLocal.Warning( "SEED %s: Expect seed_func_a >= 2 when falloff is %s.", GetName(), falloff.c_str()); *func_a = 2.0f; } @@ -1283,17 +1283,17 @@ void Seed::AddClassFromEntity( idEntity *ent, const bool watch, const bool getSp SeedClass.func_max = ent->spawnArgs.GetFloat( "seed_func_max", spawnArgs.GetString( "func_max", "1.0") ); if (SeedClass.func_min < 0.0f) { - gameLocal.Warning ("SEED %s: func_min %0.2f < 0, setting it to 0.\n", GetName(), SeedClass.func_min ); + gameLocal.Warning ("SEED %s: func_min %0.2f < 0, setting it to 0.", GetName(), SeedClass.func_min ); SeedClass.func_min = 0.0f; } if (SeedClass.func_max > 1.0f) { - gameLocal.Warning ("SEED %s: func_max %0.2f < 1.0, setting it to 1.0.\n", GetName(), SeedClass.func_max ); + gameLocal.Warning ("SEED %s: func_max %0.2f < 1.0, setting it to 1.0.", GetName(), SeedClass.func_max ); SeedClass.func_max = 1.0f; } if (SeedClass.func_min > SeedClass.func_max) { - gameLocal.Warning ("SEED %s: func_min %0.2f > func_max %0.2f, setting it to 0.\n", GetName(), SeedClass.func_min, SeedClass.func_max ); + gameLocal.Warning ("SEED %s: func_min %0.2f > func_max %0.2f, setting it to 0.", GetName(), SeedClass.func_min, SeedClass.func_max ); SeedClass.func_min = 0.0f; } @@ -1442,7 +1442,7 @@ void Seed::AddClassFromEntity( idEntity *ent, const bool watch, const bool getSp SeedClass.bunching = ent->spawnArgs.GetFloat( "seed_bunching", spawnArgs.GetString( "bunching", "0") ); if (SeedClass.bunching < 0 || SeedClass.bunching > 1.0) { - gameLocal.Warning ("SEED %s: Invalid bunching value %0.2f, must be between 0 and 1.0.\n", GetName(), SeedClass.bunching ); + gameLocal.Warning ("SEED %s: Invalid bunching value %0.2f, must be between 0 and 1.0.", GetName(), SeedClass.bunching ); SeedClass.bunching = 0; } if (SeedClass.spacing > 0) @@ -1615,7 +1615,7 @@ void Seed::AddClassFromEntity( idEntity *ent, const bool watch, const bool getSp if (SeedClass.z_min != -1000000 && !SeedClass.floor) { - gameLocal.Warning( "SEED %s: Warning: Setting seed_z_min/seed_z_max without setting 'seed_floor' to true won't work!\n", GetName() ); + gameLocal.Warning( "SEED %s: Warning: Setting seed_z_min/seed_z_max without setting 'seed_floor' to true won't work!", GetName() ); // just use flooring for this class SeedClass.floor = true; } @@ -1942,7 +1942,7 @@ void Seed::Prepare( void ) if (SeedInhibitor.falloff > 4) { // func is not supported - gameLocal.Warning( "SEED %s: falloff=func not yet supported on inhibitors, ignoring it.\n", GetName() ); + gameLocal.Warning( "SEED %s: falloff=func not yet supported on inhibitors, ignoring it.", GetName() ); SeedInhibitor.falloff = 0; } @@ -2087,12 +2087,12 @@ void Seed::Prepare( void ) if (m_iNumEntities < 0) { - gameLocal.Warning( "SEED %s: Entity count %i is invalid!\n", GetName(), m_iNumEntities ); + gameLocal.Warning( "SEED %s: Entity count %i is invalid!", GetName(), m_iNumEntities ); m_iNumEntities = 0; } if (m_iNumEntities == 0 && m_Watched.Num() == 0) { - gameLocal.Warning( "SEED %s: Feeling lonely with zero entities to care for.\n", GetName() ); + gameLocal.Warning( "SEED %s: Feeling lonely with zero entities to care for.", GetName() ); } } @@ -3183,7 +3183,7 @@ void Seed::CombineEntities( void ) float max_combine_distance = spawnArgs.GetFloat("combine_distance", "2048"); if (max_combine_distance < 10) { - gameLocal.Warning("SEED %s: combine distance %0.2f < 10, enforcing minimum 10.\n", GetName(), max_combine_distance); + gameLocal.Warning("SEED %s: combine distance %0.2f < 10, enforcing minimum 10.", GetName(), max_combine_distance); max_combine_distance = 10; } // square for easier comparing @@ -3255,11 +3255,11 @@ void Seed::CombineEntities( void ) if (NULL == tempModel) { // load model, then combine away -// gameLocal.Warning("SEED %s: Load model %s for entity %i.\n", GetName(), entityClass->modelname.c_str(), i); +// gameLocal.Warning("SEED %s: Load model %s for entity %i.", GetName(), entityClass->modelname.c_str(), i); tempModel = renderModelManager->FindModel( entityClass->modelname ); if (! tempModel) { - gameLocal.Warning("SEED %s: Could not load model %s for entity %i, skipping it.\n", GetName(), entityClass->modelname.c_str(), i); + gameLocal.Warning("SEED %s: Could not load model %s for entity %i, skipping it.", GetName(), entityClass->modelname.c_str(), i); continue; } } @@ -3279,7 +3279,7 @@ void Seed::CombineEntities( void ) } // 0 => default model, 1 => first stage etc ofs.lod = m_LODLevel + 1; -// gameLocal.Warning("SEED %s: Using LOD model %i for base entity.\n", GetName(), ofs.lod ); +// gameLocal.Warning("SEED %s: Using LOD model %i for base entity.", GetName(), ofs.lod ); // TODO: pack in the correct alpha value ofs.color = m_Entities[i].color; ofs.scale = m_Entities[i].scale; @@ -3359,7 +3359,7 @@ void Seed::CombineEntities( void ) } // 0 => default model, 1 => level 0 etc. ofs.lod = m_LODLevel + 1; -// gameLocal.Warning("SEED %s: Using LOD model %i for combined entity %i.\n", GetName(), ofs.lod, j ); +// gameLocal.Warning("SEED %s: Using LOD model %i for combined entity %i.", GetName(), ofs.lod, j ); // TODO: pack in the new alpha value ofs.color = m_Entities[j].color; ofs.scale = m_Entities[j].scale; diff --git a/game/SndPropLoader.cpp b/game/SndPropLoader.cpp index b8649d2d3..19d26788d 100644 --- a/game/SndPropLoader.cpp +++ b/game/SndPropLoader.cpp @@ -811,7 +811,7 @@ void CsndPropBase::SetPortalLoss( int handle, float value ) if( handle < 1 || handle > gameRenderWorld->NumPortals() ) { DM_LOG(LC_SOUND, LT_WARNING)LOGSTRING("SetPortalLoss called with invalid portal handle %d.\r", handle ); - gameLocal.Warning( "SetPortalLoss called with invalid portal handle %d.\n", handle ); + gameLocal.Warning( "SetPortalLoss called with invalid portal handle %d.", handle ); goto Quit; } @@ -830,7 +830,7 @@ float CsndPropBase::GetPortalLoss( int handle ) if( handle < 1 || handle > gameRenderWorld->NumPortals() ) { DM_LOG(LC_SOUND, LT_WARNING)LOGSTRING("GetPortalLoss called with invalid portal handle %d, returning zero loss.\r", handle ); - gameLocal.Warning( "GetPortalLoss called with invalid portal handle %d, returning zero loss.\n", handle ); + gameLocal.Warning( "GetPortalLoss called with invalid portal handle %d, returning zero loss.", handle ); returnval = 0.0; goto Quit; diff --git a/game/StaticMulti.cpp b/game/StaticMulti.cpp index b138821db..38ca747f6 100644 --- a/game/StaticMulti.cpp +++ b/game/StaticMulti.cpp @@ -367,7 +367,7 @@ bool CStaticMulti::UpdateRenderModel( const bool force ) hModel = renderModelManager->FindModel( m ); if (!hModel) { - gameLocal.Warning("Could not load model %s.\n", m.c_str() ); + gameLocal.Warning("Could not load model %s.", m.c_str() ); } } LODs.Append(hModel); @@ -393,7 +393,7 @@ bool CStaticMulti::UpdateRenderModel( const bool force ) hModel = renderModelManager->FindModel( m ); if (!hModel) { - gameLocal.Warning("Could not load model %s.\n", m.c_str() ); + gameLocal.Warning("Could not load model %s.", m.c_str() ); } } LODs.Append(hModel); diff --git a/game/Target.cpp b/game/Target.cpp index b79c8b53d..8e08c35d6 100644 --- a/game/Target.cpp +++ b/game/Target.cpp @@ -1756,7 +1756,7 @@ void CTarget_SetObjectiveState::Event_Activate( idEntity *activator ) gameLocal.m_MissionData->SetCompletionState(objId-1, state); } else { - gameLocal.Warning("Invalid objective ID %s on CTarget_SetObjectiveState %s\n", keyVal->GetValue().c_str(), name.c_str()); + gameLocal.Warning("Invalid objective ID %s on CTarget_SetObjectiveState %s", keyVal->GetValue().c_str(), name.c_str()); } // greebo: Lookup the next matching spawnarg @@ -1802,7 +1802,7 @@ void CTarget_SetObjectiveVisibility::Event_Activate( idEntity *activator ) } else { - gameLocal.Warning("Invalid objective ID %s on CTarget_SetObjectiveState %s\n", keyVal->GetValue().c_str(), name.c_str()); + gameLocal.Warning("Invalid objective ID %s on CTarget_SetObjectiveState %s", keyVal->GetValue().c_str(), name.c_str()); DM_LOG(LC_OBJECTIVES, LT_ERROR)LOGSTRING("Invalid objective ID %s on CTarget_SetObjectiveState %s\n", keyVal->GetValue().c_str(), name.c_str()); } } @@ -1852,7 +1852,7 @@ void CTarget_SetObjectiveComponentState::Event_Activate( idEntity *activator ) if (objId > 0 && compId > 0) gameLocal.m_MissionData->SetComponentState_Ext(objId, compId, state); else - gameLocal.Warning("Invalid objective component ID %s on CTarget_SetObjectiveState %s\n", StringID.c_str(), name.c_str()); + gameLocal.Warning("Invalid objective component ID %s on CTarget_SetObjectiveState %s", StringID.c_str(), name.c_str()); // Lookup the next matching spawnarg keyVal = spawnArgs.MatchPrefix("comp_id", keyVal); diff --git a/game/ai/AI.cpp b/game/ai/AI.cpp index 4963d7010..c03a157f2 100644 --- a/game/ai/AI.cpp +++ b/game/ai/AI.cpp @@ -11231,7 +11231,7 @@ void idAI::PushMove() if (moveStack.size() > 100) { - gameLocal.Warning("AI MoveStack contains more than 100 moves! (%s)\n", name.c_str()); + gameLocal.Warning("AI MoveStack contains more than 100 moves! (%s)", name.c_str()); } } diff --git a/game/ai/Conversation/Conversation.cpp b/game/ai/Conversation/Conversation.cpp index 8e5c9d461..603b80bf6 100644 --- a/game/ai/Conversation/Conversation.cpp +++ b/game/ai/Conversation/Conversation.cpp @@ -444,7 +444,7 @@ void Conversation::InitFromSpawnArgs(const idDict& dict, int index) if (_actors.Num() == 0) { _isValid = false; // no actors, no conversation - gameLocal.Warning("Ignoring conversation %s as it has no actors.\n", _name.c_str()); + gameLocal.Warning("Ignoring conversation %s as it has no actors.", _name.c_str()); return; } @@ -481,7 +481,7 @@ void Conversation::InitFromSpawnArgs(const idDict& dict, int index) { // No commands, what kind of conversation is this? _isValid = false; - gameLocal.Warning("Ignoring conversation %s as it has no commands.\n", _name.c_str()); + gameLocal.Warning("Ignoring conversation %s as it has no commands.", _name.c_str()); return; } @@ -489,7 +489,7 @@ void Conversation::InitFromSpawnArgs(const idDict& dict, int index) if (_talkDistance <= 0.0f) { _isValid = false; - gameLocal.Warning("Ignoring conversation %s as it has a talk distance <= 0.\n", _name.c_str()); + gameLocal.Warning("Ignoring conversation %s as it has a talk distance <= 0.", _name.c_str()); return; } diff --git a/game/ai/Conversation/ConversationSystem.cpp b/game/ai/Conversation/ConversationSystem.cpp index a2edee157..fa2142114 100644 --- a/game/ai/Conversation/ConversationSystem.cpp +++ b/game/ai/Conversation/ConversationSystem.cpp @@ -97,7 +97,7 @@ void ConversationSystem::StartConversation(int index) if (conv == NULL) { - gameLocal.Warning("StartConversation: Can't find conversation with index %d\n", index); + gameLocal.Warning("StartConversation: Can't find conversation with index %d", index); return; } @@ -130,7 +130,7 @@ void ConversationSystem::EndConversation(int index) if (conv == NULL) { - gameLocal.Warning("StartConversation: Can't find conversation with index %d\n", index); + gameLocal.Warning("StartConversation: Can't find conversation with index %d", index); return; } diff --git a/game/ai/EAS/EAS.cpp b/game/ai/EAS/EAS.cpp index 2d41b9237..767a1b31c 100644 --- a/game/ai/EAS/EAS.cpp +++ b/game/ai/EAS/EAS.cpp @@ -900,7 +900,7 @@ void tdmEAS::DrawRoute(int startArea, int goalArea) if (startCluster < 0 || goalCluster < 0) { - gameLocal.Warning("Cannot draw route, cluster numbers < 0.\r"); + gameLocal.Warning("Cannot draw route, cluster numbers < 0."); return; } diff --git a/game/ai/MovementSubsystem.cpp b/game/ai/MovementSubsystem.cpp index 33611fd1d..17fca0f1a 100644 --- a/game/ai/MovementSubsystem.cpp +++ b/game/ai/MovementSubsystem.cpp @@ -456,7 +456,7 @@ void MovementSubsystem::StartPathTask() else { // Finish this task - gameLocal.Warning("Unknown path corner classname '%s' on %s\n", classname.c_str(),path->name.c_str()); + gameLocal.Warning("Unknown path corner classname '%s' on %s", classname.c_str(),path->name.c_str()); return; } diff --git a/game/ai/States/ConversationState.cpp b/game/ai/States/ConversationState.cpp index 169e977bd..d054044d2 100644 --- a/game/ai/States/ConversationState.cpp +++ b/game/ai/States/ConversationState.cpp @@ -69,7 +69,7 @@ void ConversationState::SetConversation(int index) { if (gameLocal.m_ConversationSystem->GetConversation(index) == NULL) { - gameLocal.Warning("AI ConversationState: Could not find conversation %d\n", index); + gameLocal.Warning("AI ConversationState: Could not find conversation %d", index); } _conversation = index; diff --git a/game/ai/Tasks/PathAnimTask.cpp b/game/ai/Tasks/PathAnimTask.cpp index 24398fb09..8bfddff56 100644 --- a/game/ai/Tasks/PathAnimTask.cpp +++ b/game/ai/Tasks/PathAnimTask.cpp @@ -58,7 +58,7 @@ void PathAnimTask::Init(idAI* owner, Subsystem& subsystem) idStr animName = path->spawnArgs.GetString("anim"); if (animName.IsEmpty()) { - gameLocal.Warning("path_anim entity %s without 'anim' spawnarg found.\n",path->name.c_str()); + gameLocal.Warning("path_anim entity %s without 'anim' spawnarg found.",path->name.c_str()); subsystem.FinishTask(); } diff --git a/game/ai/Tasks/PathCycleAnimTask.cpp b/game/ai/Tasks/PathCycleAnimTask.cpp index 81786389f..8f8590a15 100644 --- a/game/ai/Tasks/PathCycleAnimTask.cpp +++ b/game/ai/Tasks/PathCycleAnimTask.cpp @@ -57,7 +57,7 @@ void PathCycleAnimTask::Init(idAI* owner, Subsystem& subsystem) idStr animName = path->spawnArgs.GetString("anim"); if (animName.IsEmpty()) { - gameLocal.Warning("path_anim entity %s without 'anim' spawnarg found.\n",path->name.c_str()); + gameLocal.Warning("path_anim entity %s without 'anim' spawnarg found.",path->name.c_str()); subsystem.FinishTask(); } diff --git a/game/ai/Tasks/PlayAnimationTask.cpp b/game/ai/Tasks/PlayAnimationTask.cpp index 570304395..b693fa766 100644 --- a/game/ai/Tasks/PlayAnimationTask.cpp +++ b/game/ai/Tasks/PlayAnimationTask.cpp @@ -57,7 +57,7 @@ void PlayAnimationTask::Init(idAI* owner, Subsystem& subsystem) // Parse animation spawnargs here if (_animName.IsEmpty()) { - gameLocal.Warning("%s cannot start PlayAnimationTask with empty animation name.\n",owner->name.c_str()); + gameLocal.Warning("%s cannot start PlayAnimationTask with empty animation name.",owner->name.c_str()); subsystem.FinishTask(); } diff --git a/game/anim/Anim_Blend.cpp b/game/anim/Anim_Blend.cpp index 607388c1b..02e96b1c0 100644 --- a/game/anim/Anim_Blend.cpp +++ b/game/anim/Anim_Blend.cpp @@ -1267,12 +1267,12 @@ void idAnim::CallFrameCommands( idEntity *ent, int from, int to, idAnimBlend *ca { ent->Detach( command.string->c_str() ); // and now remove it from the game world - // gameLocal.Warning ( "Going to remove attachment '%s' from '%s'\n", command.string->c_str(), ent->getName().c_str() ); + // gameLocal.Warning ( "Going to remove attachment '%s' from '%s'", command.string->c_str(), ent->getName().c_str() ); attEntity->PostEventMS( &EV_Remove, 0 ); } else { - gameLocal.Warning ( "Cannot find attachment '%s' to destroy in animation.\n", command.string->c_str() ); + gameLocal.Warning ( "Cannot find attachment '%s' to destroy in animation.", command.string->c_str() ); } break; } diff --git a/game/anim/Anim_Import.cpp b/game/anim/Anim_Import.cpp index 5f3aea44e..505dc118b 100644 --- a/game/anim/Anim_Import.cpp +++ b/game/anim/Anim_Import.cpp @@ -118,7 +118,7 @@ bool idModelExport::CheckMayaInstall( void ) { return true; } - gameLocal.Warning("Maya key not found in registry, continuing...\n"); + gameLocal.Warning("Maya key not found in registry, continuing..."); return true; // greebo: both keys failed, let the game continue anyways #endif diff --git a/game/decltdm_matinfo.cpp b/game/decltdm_matinfo.cpp index 460e6c21c..5ebcabd74 100644 --- a/game/decltdm_matinfo.cpp +++ b/game/decltdm_matinfo.cpp @@ -156,7 +156,7 @@ void tdmDeclTDM_MatInfo::precacheMap( idMapFile *map ) { declManager->MediaPrint( "Precaching TDM_MatInfo %s\n", patch->GetMaterial() ); declManager->FindType( DECL_TDM_MATINFO, patch->GetMaterial() ); } else { - gameLocal.Warning( "tdmDeclTDM_MatInfo(): unknown primitive type: %d\n", prim->GetType() ); + gameLocal.Warning( "tdmDeclTDM_MatInfo(): unknown primitive type: %d", prim->GetType() ); } } } diff --git a/game/gamesys/SaveGame.cpp b/game/gamesys/SaveGame.cpp index af65f9b63..79ba1369f 100644 --- a/game/gamesys/SaveGame.cpp +++ b/game/gamesys/SaveGame.cpp @@ -223,7 +223,7 @@ void idSaveGame::WriteObject( const idClass *obj ) { index = objects.FindIndex( obj ); if ( index < 0 ) { - gameLocal.Warning( "idSaveGame::WriteObject - WriteObject FindIndex failed\n" ); + gameLocal.Warning( "idSaveGame::WriteObject - WriteObject FindIndex failed" ); // Use the NULL index index = 0; diff --git a/game/gamesys/SysCmds.cpp b/game/gamesys/SysCmds.cpp index ef4108e51..ce39866de 100644 --- a/game/gamesys/SysCmds.cpp +++ b/game/gamesys/SysCmds.cpp @@ -2950,7 +2950,7 @@ void GetMaterialStageInfo ( const char* a_strMatStageName, idLexer &a_lexSource, { if( !a_lexSource.ReadToken( &tknMatStage ) ) { - gameLocal.Warning( "Unexpected end of material when trying to obtain scale. \n"); + gameLocal.Warning( "Unexpected end of material when trying to obtain scale. "); break; } // Not using expectTokenString anymore since "Map" is treated as different token than "map". @@ -3016,7 +3016,7 @@ bool FindBlockContainingWords( const char *a_text, std::vector& a_arrSea if( uiSearchIndex < 0 ) { - gameLocal.Warning( " Could not find search word %s\n", (*iter).c_str() ); + gameLocal.Warning( " Could not find search word %s", (*iter).c_str() ); return false; } @@ -3027,7 +3027,7 @@ bool FindBlockContainingWords( const char *a_text, std::vector& a_arrSea { if( uiSearchIndex != uiSearchOffset ) { - gameLocal.Warning( " Could not find search word %s in the expected order\n", (*iter).c_str() ); + gameLocal.Warning( " Could not find search word %s in the expected order", (*iter).c_str() ); //Start the search from the first word again, since all of the search words are important. bAreAllWordsFound = false; @@ -3086,11 +3086,11 @@ bool FindBlockContainingWords( const char *a_text, std::vector& a_arrSea return true; } } - // gameLocal.Warning( " Block start found:%d Block End Found:%d, Returning false.\n", (int)bIsStartOffsetFound, (int)bIsEndOffsetFound ); + // gameLocal.Warning( " Block start found:%d Block End Found:%d, Returning false.", (int)bIsStartOffsetFound, (int)bIsEndOffsetFound ); } // if( !bAreAllWordsFound ) - // gameLocal.Warning( " Returning false since given words can't be found in the exact given order.\n" ); + // gameLocal.Warning( " Returning false since given words can't be found in the exact given order." ); return false; } @@ -3506,7 +3506,7 @@ void Cmd_BatchConvertMaterials_f( const idCmdArgs& args ) } else { - gameLocal.Warning( "Could not determine end of the material block. Skipping this material.\n" ); + gameLocal.Warning( "Could not determine end of the material block. Skipping this material." ); // mat->Invalidate(); // mat->FreeData(); continue; @@ -3528,7 +3528,7 @@ void Cmd_BatchConvertMaterials_f( const idCmdArgs& args ) if( !mat->Parse( strMatTextWithNewBlock.c_str(), strMatTextWithNewBlock.Length() ) ) { - gameLocal.Warning( "Material %s had error in the newly inserted text %s. \n Aborting.\n", mat->GetName(), &arrCharNewAmbientBlock[0] ); + gameLocal.Warning( "Material %s had error in the newly inserted text %s. \n Aborting.", mat->GetName(), &arrCharNewAmbientBlock[0] ); break; } mat->ReplaceSourceFileText(); diff --git a/idlib/MapFile.cpp b/idlib/MapFile.cpp index 944b8a531..5873e5973 100644 --- a/idlib/MapFile.cpp +++ b/idlib/MapFile.cpp @@ -839,7 +839,7 @@ bool idMapFile::Write( const char *fileName, const char *ext, bool fromBasePath } if ( !fp ) { - idLib::common->Warning( "Couldn't open %s\n", qpath.c_str() ); + idLib::common->Warning( "Couldn't open %s", qpath.c_str() ); return false; } diff --git a/idlib/Str.cpp b/idlib/Str.cpp index dd85b6952..06f00cd07 100644 --- a/idlib/Str.cpp +++ b/idlib/Str.cpp @@ -1618,7 +1618,7 @@ int idStr::snPrintf( char *dest, int size, const char *fmt, ...) { idLib::common->Error( "idStr::snPrintf: overflowed buffer" ); } if ( len >= (unsigned int) size ) { - idLib::common->Warning( "idStr::snPrintf: overflow of %i in %i\n", len, size ); + idLib::common->Warning( "idStr::snPrintf: overflow of %i in %i", len, size ); len = size; } idStr::Copynz( dest, buffer, size ); diff --git a/renderer/Image_load.cpp b/renderer/Image_load.cpp index 61a03a608..a57181170 100644 --- a/renderer/Image_load.cpp +++ b/renderer/Image_load.cpp @@ -1471,7 +1471,7 @@ void idImage::UploadPrecompressedImage( byte *data, int len ) { internalFormat = GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT; break; default: - common->Warning( "Invalid compressed internal format: %s\n", imgName.c_str() ); + common->Warning( "Invalid compressed internal format: %s", imgName.c_str() ); return; } } else if ( ( header->ddspf.dwFlags & DDSF_RGBA ) && header->ddspf.dwRGBBitCount == 32 ) { @@ -1492,7 +1492,7 @@ void idImage::UploadPrecompressedImage( byte *data, int len ) { externalFormat = GL_ALPHA; internalFormat = GL_ALPHA8; } else { - common->Warning( "Invalid uncompressed internal format: %s\n", imgName.c_str() ); + common->Warning( "Invalid uncompressed internal format: %s", imgName.c_str() ); return; } diff --git a/renderer/Material.cpp b/renderer/Material.cpp index 47cdd0c6c..b595a466e 100644 --- a/renderer/Material.cpp +++ b/renderer/Material.cpp @@ -870,7 +870,7 @@ void idMaterial::ParseVertexParm( idLexer &src, newShaderStage_t *newStage ) { src.ReadTokenOnLine( &token ); int parm = token.GetIntValue(); if ( !token.IsNumeric() || parm < 0 || parm >= MAX_VERTEX_PARMS ) { - common->Warning( "bad vertexParm number\n" ); + common->Warning( "bad vertexParm number" ); SetMaterialFlag( MF_DEFAULTED ); return; } @@ -932,7 +932,7 @@ void idMaterial::ParseFragmentMap( idLexer &src, newShaderStage_t *newStage ) { src.ReadTokenOnLine( &token ); int unit = token.GetIntValue(); if ( !token.IsNumeric() || unit < 0 || unit >= MAX_FRAGMENT_IMAGES ) { - common->Warning( "bad fragmentMap number\n" ); + common->Warning( "bad fragmentMap number" ); SetMaterialFlag( MF_DEFAULTED ); return; } diff --git a/sys/linux/sound_alsa.cpp b/sys/linux/sound_alsa.cpp index 9fb3c7d11..eb6499f53 100644 --- a/sys/linux/sound_alsa.cpp +++ b/sys/linux/sound_alsa.cpp @@ -101,7 +101,7 @@ idAudioHardwareALSA::InitFailed void idAudioHardwareALSA::InitFailed() { Release(); cvarSystem->SetCVarBool( "s_noSound", true ); - common->Warning( "sound subsystem disabled\n" ); + common->Warning( "sound subsystem disabled" ); common->Printf( "--------------------------------------\n" ); } diff --git a/sys/osx/macosx_sound.cpp b/sys/osx/macosx_sound.cpp index 8502d0c27..2e20ba7b0 100644 --- a/sys/osx/macosx_sound.cpp +++ b/sys/osx/macosx_sound.cpp @@ -119,7 +119,7 @@ void idAudioHardwareOSX::Reset() { } status = AudioDeviceRemoveIOProc( selectedDevice, DeviceIOProc ); if ( status != kAudioHardwareNoError ) { - common->Warning( "idAudioHardwareOSX::Reset: AudioDeviceRemoveIOProc failed. status %s\n", ExtractStatus( status ) ); + common->Warning( "idAudioHardwareOSX::Reset: AudioDeviceRemoveIOProc failed. status %s", ExtractStatus( status ) ); } activeIOProc = false; } diff --git a/sys/posix/posix_net.cpp b/sys/posix/posix_net.cpp index dd6546f26..e644f0dbc 100644 --- a/sys/posix/posix_net.cpp +++ b/sys/posix/posix_net.cpp @@ -637,7 +637,7 @@ bool idTCP::Init( const char *host, short port ) { NetadrToSockadr(&address, &sadr); if (fd) { - common->Warning("idTCP::Init: already initialized?\n"); + common->Warning("idTCP::Init: already initialized?"); } if ((fd = socket(PF_INET, SOCK_STREAM, 0)) == -1) { diff --git a/ui/GuiScript.cpp b/ui/GuiScript.cpp index fc122edcb..c623d21f6 100644 --- a/ui/GuiScript.cpp +++ b/ui/GuiScript.cpp @@ -198,7 +198,7 @@ void Script_Transition(idWindow *window, idList *src) { // added float variable if (!((vec4 || rect || val) && from && to && timeStr)) { // - common->Warning("Bad transition in gui %s in window %s\n", window->GetGui()->GetSourceFile(), window->GetName()); + common->Warning("Bad transition in gui %s in window %s", window->GetGui()->GetSourceFile(), window->GetName()); return; } int time = atoi(*timeStr); diff --git a/ui/Window.cpp b/ui/Window.cpp index d612b808b..7b8fd3676 100644 --- a/ui/Window.cpp +++ b/ui/Window.cpp @@ -2015,7 +2015,7 @@ bool idWindow::ParseInternalVar(const char *_name, idParser *src) { return true; } if (idStr::Icmp(_name, "play") == 0) { - common->Warning( "play encountered during gui parse.. see Robert\n" ); + common->Warning( "play encountered during gui parse.. see Robert" ); idStr playStr; ParseString(src, playStr); return true;