From 6d6c5c8ce797b8543a70426c98e04ff6bedae67f Mon Sep 17 00:00:00 2001 From: dhewg Date: Sun, 15 Jan 2012 13:39:23 +0100 Subject: [PATCH] Fix "unreachable code" warnings --- neo/d3xp/BrittleFracture.cpp | 8 ++-- neo/d3xp/Entity.cpp | 39 ++++++++------- neo/d3xp/Game_network.cpp | 73 ++++++++++++++--------------- neo/d3xp/Item.cpp | 8 ++-- neo/d3xp/Light.cpp | 8 ++-- neo/d3xp/Misc.cpp | 8 ++-- neo/d3xp/Moveable.cpp | 11 ++--- neo/d3xp/Player.cpp | 14 +++--- neo/d3xp/Projectile.cpp | 8 ++-- neo/d3xp/Weapon.cpp | 8 ++-- neo/framework/async/AsyncClient.cpp | 3 +- neo/game/BrittleFracture.cpp | 8 ++-- neo/game/Entity.cpp | 39 ++++++++------- neo/game/Game_network.cpp | 73 ++++++++++++++--------------- neo/game/Item.cpp | 8 ++-- neo/game/Light.cpp | 8 ++-- neo/game/Misc.cpp | 8 ++-- neo/game/Moveable.cpp | 11 ++--- neo/game/Player.cpp | 10 ++-- neo/game/Projectile.cpp | 8 ++-- neo/game/Weapon.cpp | 8 ++-- neo/idlib/math/Matrix.h | 5 +- neo/renderer/Model_lwo.cpp | 1 - neo/renderer/Model_ma.cpp | 7 --- 24 files changed, 184 insertions(+), 198 deletions(-) diff --git a/neo/d3xp/BrittleFracture.cpp b/neo/d3xp/BrittleFracture.cpp index 75e13492..d05022a2 100644 --- a/neo/d3xp/BrittleFracture.cpp +++ b/neo/d3xp/BrittleFracture.cpp @@ -1374,9 +1374,9 @@ bool idBrittleFracture::ClientReceiveEvent( int event, int time, const idBitMsg Shatter( point, dir, time ); return true; } - default: { - return idEntity::ClientReceiveEvent( event, time, msg ); - } + default: + break; } - return false; + + return idEntity::ClientReceiveEvent( event, time, msg ); } diff --git a/neo/d3xp/Entity.cpp b/neo/d3xp/Entity.cpp index 9fb6f24e..88692a4d 100644 --- a/neo/d3xp/Entity.cpp +++ b/neo/d3xp/Entity.cpp @@ -932,21 +932,20 @@ bool idEntity::DoDormantTests( void ) { return false; } return true; - } else { - // the monster area is topologically connected to a player, but if - // the monster hasn't been woken up before, do the more precise PVS check - if ( !fl.hasAwakened ) { - if ( !gameLocal.InPlayerPVS( this ) ) { - return true; // stay dormant - } - } - - // wake up - dormantStart = 0; - fl.hasAwakened = true; // only go dormant when area closed off now, not just out of PVS - return false; } + // the monster area is topologically connected to a player, but if + // the monster hasn't been woken up before, do the more precise PVS check + if ( !fl.hasAwakened ) { + if ( !gameLocal.InPlayerPVS( this ) ) { + return true; // stay dormant + } + } + + // wake up + dormantStart = 0; + fl.hasAwakened = true; // only go dormant when area closed off now, not just out of PVS + return false; } @@ -5028,10 +5027,10 @@ bool idEntity::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) { StopSound( channel, false ); return true; } - default: { - return false; - } + default: + break; } + return false; } @@ -5509,11 +5508,11 @@ bool idAnimatedEntity::ClientReceiveEvent( int event, int time, const idBitMsg & AddLocalDamageEffect( jointNum, localOrigin, localNormal, localDir, damageDef, collisionMaterial ); return true; } - default: { - return idEntity::ClientReceiveEvent( event, time, msg ); - } + default: + break; } - return false; + + return idEntity::ClientReceiveEvent( event, time, msg ); } /* diff --git a/neo/d3xp/Game_network.cpp b/neo/d3xp/Game_network.cpp index ae53fadd..d65be3d9 100644 --- a/neo/d3xp/Game_network.cpp +++ b/neo/d3xp/Game_network.cpp @@ -1615,49 +1615,48 @@ bool idGameLocal::DownloadRequest( const char *IP, const char *guid, const char } idStr::snPrintf( urls, MAX_STRING_CHARS, "1;%s", cvarSystem->GetCVarString( "si_serverURL" ) ); return true; - } else { - // 2: table of pak URLs - // first token is the game pak if request, empty if not requested by the client - // there may be empty tokens for paks the server couldn't pinpoint - the order matters - idStr reply = "2;"; - idStrList dlTable, pakList; - int i, j; + } - Tokenize( dlTable, cvarSystem->GetCVarString( "net_serverDlTable" ) ); - Tokenize( pakList, paks ); + // 2: table of pak URLs + // first token is the game pak if request, empty if not requested by the client + // there may be empty tokens for paks the server couldn't pinpoint - the order matters + idStr reply = "2;"; + idStrList dlTable, pakList; + int i, j; - for ( i = 0; i < pakList.Num(); i++ ) { - if ( i > 0 ) { - reply += ";"; - } - if ( pakList[ i ][ 0 ] == '\0' ) { - if ( i == 0 ) { - // pak 0 will always miss when client doesn't ask for game bin - common->DPrintf( "no game pak request\n" ); - } else { - common->DPrintf( "no pak %d\n", i ); - } - continue; - } - for ( j = 0; j < dlTable.Num(); j++ ) { - if ( !fileSystem->FilenameCompare( pakList[ i ], dlTable[ j ] ) ) { - break; - } - } - if ( j == dlTable.Num() ) { - common->Printf( "download for %s: pak not matched: %s\n", IP, pakList[ i ].c_str() ); + Tokenize( dlTable, cvarSystem->GetCVarString( "net_serverDlTable" ) ); + Tokenize( pakList, paks ); + + for ( i = 0; i < pakList.Num(); i++ ) { + if ( i > 0 ) { + reply += ";"; + } + if ( pakList[ i ][ 0 ] == '\0' ) { + if ( i == 0 ) { + // pak 0 will always miss when client doesn't ask for game bin + common->DPrintf( "no game pak request\n" ); } else { - idStr url = cvarSystem->GetCVarString( "net_serverDlBaseURL" ); - url.AppendPath( dlTable[ j ] ); - reply += url; - common->DPrintf( "download for %s: %s\n", IP, url.c_str() ); + common->DPrintf( "no pak %d\n", i ); + } + continue; + } + for ( j = 0; j < dlTable.Num(); j++ ) { + if ( !fileSystem->FilenameCompare( pakList[ i ], dlTable[ j ] ) ) { + break; } } - - idStr::Copynz( urls, reply, MAX_STRING_CHARS ); - return true; + if ( j == dlTable.Num() ) { + common->Printf( "download for %s: pak not matched: %s\n", IP, pakList[ i ].c_str() ); + } else { + idStr url = cvarSystem->GetCVarString( "net_serverDlBaseURL" ); + url.AppendPath( dlTable[ j ] ); + reply += url; + common->DPrintf( "download for %s: %s\n", IP, url.c_str() ); + } } - return false; + + idStr::Copynz( urls, reply, MAX_STRING_CHARS ); + return true; } /* diff --git a/neo/d3xp/Item.cpp b/neo/d3xp/Item.cpp index 87d0eeae..0c1356d8 100644 --- a/neo/d3xp/Item.cpp +++ b/neo/d3xp/Item.cpp @@ -486,11 +486,11 @@ bool idItem::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) { Event_RespawnFx(); return true; } - default: { - return idEntity::ClientReceiveEvent( event, time, msg ); - } + default: + break; } - return false; + + return idEntity::ClientReceiveEvent( event, time, msg ); } /* diff --git a/neo/d3xp/Light.cpp b/neo/d3xp/Light.cpp index 98b79957..a937c8b2 100644 --- a/neo/d3xp/Light.cpp +++ b/neo/d3xp/Light.cpp @@ -1157,9 +1157,9 @@ bool idLight::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) { BecomeBroken( NULL ); return true; } - default: { - return idEntity::ClientReceiveEvent( event, time, msg ); - } + default: + break; } - return false; + + return idEntity::ClientReceiveEvent( event, time, msg ); } diff --git a/neo/d3xp/Misc.cpp b/neo/d3xp/Misc.cpp index 55cf6790..f87342d5 100644 --- a/neo/d3xp/Misc.cpp +++ b/neo/d3xp/Misc.cpp @@ -137,11 +137,11 @@ bool idPlayerStart::ClientReceiveEvent( int event, int time, const idBitMsg &msg } return true; } - default: { - return idEntity::ClientReceiveEvent( event, time, msg ); - } + default: + break; } - return false; + + return idEntity::ClientReceiveEvent( event, time, msg ); } /* diff --git a/neo/d3xp/Moveable.cpp b/neo/d3xp/Moveable.cpp index 2ab494ec..f771ecee 100644 --- a/neo/d3xp/Moveable.cpp +++ b/neo/d3xp/Moveable.cpp @@ -1345,15 +1345,14 @@ idExplodingBarrel::ClientReceiveEvent bool idExplodingBarrel::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) { switch( event ) { - case EVENT_EXPLODE: { + case EVENT_EXPLODE: if ( gameLocal.realClientTime - msg.ReadLong() < spawnArgs.GetInt( "explode_lapse", "1000" ) ) { ExplodingEffects( ); } return true; - } - default: { - return idBarrel::ClientReceiveEvent( event, time, msg ); - } + default: + break; } - return false; + + return idBarrel::ClientReceiveEvent( event, time, msg ); } diff --git a/neo/d3xp/Player.cpp b/neo/d3xp/Player.cpp index f53b09f0..ae217f62 100644 --- a/neo/d3xp/Player.cpp +++ b/neo/d3xp/Player.cpp @@ -7633,11 +7633,9 @@ bool idPlayer::CanGive( const char *statname, const char *value ) { return false; } return true; - } else { - return inventory.CanGive( this, spawnArgs, statname, value, &idealWeapon ); } - return false; + return inventory.CanGive( this, spawnArgs, statname, value, &idealWeapon ); } /* @@ -9817,13 +9815,13 @@ bool idPlayer::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) { // happens if the event and the spectate change are written on the server during the same frame (fraglimit) return true; } - return idActor::ClientReceiveEvent( event, time, msg ); - } - default: { - return idActor::ClientReceiveEvent( event, time, msg ); + break; } + default: + break; } - return false; + + return idActor::ClientReceiveEvent( event, time, msg ); } /* diff --git a/neo/d3xp/Projectile.cpp b/neo/d3xp/Projectile.cpp index 4b7bbfec..6e53ce36 100644 --- a/neo/d3xp/Projectile.cpp +++ b/neo/d3xp/Projectile.cpp @@ -1383,11 +1383,11 @@ bool idProjectile::ClientReceiveEvent( int event, int time, const idBitMsg &msg DefaultDamageEffect( this, spawnArgs, collision, velocity ); return true; } - default: { - return idEntity::ClientReceiveEvent( event, time, msg ); - } + default: + break; } - return false; + + return idEntity::ClientReceiveEvent( event, time, msg ); } /* diff --git a/neo/d3xp/Weapon.cpp b/neo/d3xp/Weapon.cpp index c820ba17..79a246fc 100644 --- a/neo/d3xp/Weapon.cpp +++ b/neo/d3xp/Weapon.cpp @@ -2757,11 +2757,11 @@ bool idWeapon::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) { } return true; } - default: { - return idEntity::ClientReceiveEvent( event, time, msg ); - } + default: + break; } - return false; + + return idEntity::ClientReceiveEvent( event, time, msg ); } /*********************************************************************** diff --git a/neo/framework/async/AsyncClient.cpp b/neo/framework/async/AsyncClient.cpp index 41e174ec..b8b47558 100644 --- a/neo/framework/async/AsyncClient.cpp +++ b/neo/framework/async/AsyncClient.cpp @@ -1478,8 +1478,9 @@ bool idAsyncClient::ValidatePureServerChecksums( const netadr_t from, const idBi cmdSystem->BufferCommandText( CMD_EXEC_NOW, "disconnect" ); return false; default: - return true; + break; } + return true; } diff --git a/neo/game/BrittleFracture.cpp b/neo/game/BrittleFracture.cpp index c6900fd8..58557a0f 100644 --- a/neo/game/BrittleFracture.cpp +++ b/neo/game/BrittleFracture.cpp @@ -1280,9 +1280,9 @@ bool idBrittleFracture::ClientReceiveEvent( int event, int time, const idBitMsg Shatter( point, dir, time ); return true; } - default: { - return idEntity::ClientReceiveEvent( event, time, msg ); - } + default: + break; } - return false; + + return idEntity::ClientReceiveEvent( event, time, msg ); } diff --git a/neo/game/Entity.cpp b/neo/game/Entity.cpp index d8552193..f7776dc7 100644 --- a/neo/game/Entity.cpp +++ b/neo/game/Entity.cpp @@ -863,21 +863,20 @@ bool idEntity::DoDormantTests( void ) { return false; } return true; - } else { - // the monster area is topologically connected to a player, but if - // the monster hasn't been woken up before, do the more precise PVS check - if ( !fl.hasAwakened ) { - if ( !gameLocal.InPlayerPVS( this ) ) { - return true; // stay dormant - } - } - - // wake up - dormantStart = 0; - fl.hasAwakened = true; // only go dormant when area closed off now, not just out of PVS - return false; } + // the monster area is topologically connected to a player, but if + // the monster hasn't been woken up before, do the more precise PVS check + if ( !fl.hasAwakened ) { + if ( !gameLocal.InPlayerPVS( this ) ) { + return true; // stay dormant + } + } + + // wake up + dormantStart = 0; + fl.hasAwakened = true; // only go dormant when area closed off now, not just out of PVS + return false; } @@ -4854,10 +4853,10 @@ bool idEntity::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) { StopSound( channel, false ); return true; } - default: { - return false; - } + default: + break; } + return false; } @@ -5297,11 +5296,11 @@ bool idAnimatedEntity::ClientReceiveEvent( int event, int time, const idBitMsg & AddLocalDamageEffect( jointNum, localOrigin, localNormal, localDir, damageDef, collisionMaterial ); return true; } - default: { - return idEntity::ClientReceiveEvent( event, time, msg ); - } + default: + break; } - return false; + + return idEntity::ClientReceiveEvent( event, time, msg ); } /* diff --git a/neo/game/Game_network.cpp b/neo/game/Game_network.cpp index aaaa96e4..0a1b07a0 100644 --- a/neo/game/Game_network.cpp +++ b/neo/game/Game_network.cpp @@ -1570,49 +1570,48 @@ bool idGameLocal::DownloadRequest( const char *IP, const char *guid, const char } idStr::snPrintf( urls, MAX_STRING_CHARS, "1;%s", cvarSystem->GetCVarString( "si_serverURL" ) ); return true; - } else { - // 2: table of pak URLs - // first token is the game pak if request, empty if not requested by the client - // there may be empty tokens for paks the server couldn't pinpoint - the order matters - idStr reply = "2;"; - idStrList dlTable, pakList; - int i, j; + } - Tokenize( dlTable, cvarSystem->GetCVarString( "net_serverDlTable" ) ); - Tokenize( pakList, paks ); + // 2: table of pak URLs + // first token is the game pak if request, empty if not requested by the client + // there may be empty tokens for paks the server couldn't pinpoint - the order matters + idStr reply = "2;"; + idStrList dlTable, pakList; + int i, j; - for ( i = 0; i < pakList.Num(); i++ ) { - if ( i > 0 ) { - reply += ";"; - } - if ( pakList[ i ][ 0 ] == '\0' ) { - if ( i == 0 ) { - // pak 0 will always miss when client doesn't ask for game bin - common->DPrintf( "no game pak request\n" ); - } else { - common->DPrintf( "no pak %d\n", i ); - } - continue; - } - for ( j = 0; j < dlTable.Num(); j++ ) { - if ( !fileSystem->FilenameCompare( pakList[ i ], dlTable[ j ] ) ) { - break; - } - } - if ( j == dlTable.Num() ) { - common->Printf( "download for %s: pak not matched: %s\n", IP, pakList[ i ].c_str() ); + Tokenize( dlTable, cvarSystem->GetCVarString( "net_serverDlTable" ) ); + Tokenize( pakList, paks ); + + for ( i = 0; i < pakList.Num(); i++ ) { + if ( i > 0 ) { + reply += ";"; + } + if ( pakList[ i ][ 0 ] == '\0' ) { + if ( i == 0 ) { + // pak 0 will always miss when client doesn't ask for game bin + common->DPrintf( "no game pak request\n" ); } else { - idStr url = cvarSystem->GetCVarString( "net_serverDlBaseURL" ); - url.AppendPath( dlTable[ j ] ); - reply += url; - common->DPrintf( "download for %s: %s\n", IP, url.c_str() ); + common->DPrintf( "no pak %d\n", i ); + } + continue; + } + for ( j = 0; j < dlTable.Num(); j++ ) { + if ( !fileSystem->FilenameCompare( pakList[ i ], dlTable[ j ] ) ) { + break; } } - - idStr::Copynz( urls, reply, MAX_STRING_CHARS ); - return true; + if ( j == dlTable.Num() ) { + common->Printf( "download for %s: pak not matched: %s\n", IP, pakList[ i ].c_str() ); + } else { + idStr url = cvarSystem->GetCVarString( "net_serverDlBaseURL" ); + url.AppendPath( dlTable[ j ] ); + reply += url; + common->DPrintf( "download for %s: %s\n", IP, url.c_str() ); + } } - return false; + + idStr::Copynz( urls, reply, MAX_STRING_CHARS ); + return true; } /* diff --git a/neo/game/Item.cpp b/neo/game/Item.cpp index 9ed3682b..97ae9523 100644 --- a/neo/game/Item.cpp +++ b/neo/game/Item.cpp @@ -478,11 +478,11 @@ bool idItem::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) { Event_RespawnFx(); return true; } - default: { - return idEntity::ClientReceiveEvent( event, time, msg ); - } + default: + break; } - return false; + + return idEntity::ClientReceiveEvent( event, time, msg ); } /* diff --git a/neo/game/Light.cpp b/neo/game/Light.cpp index 558e04e3..a195b35a 100644 --- a/neo/game/Light.cpp +++ b/neo/game/Light.cpp @@ -1150,9 +1150,9 @@ bool idLight::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) { BecomeBroken( NULL ); return true; } - default: { - return idEntity::ClientReceiveEvent( event, time, msg ); - } + default: + break; } - return false; + + return idEntity::ClientReceiveEvent( event, time, msg ); } diff --git a/neo/game/Misc.cpp b/neo/game/Misc.cpp index 9e6ec736..bfde7193 100644 --- a/neo/game/Misc.cpp +++ b/neo/game/Misc.cpp @@ -137,11 +137,11 @@ bool idPlayerStart::ClientReceiveEvent( int event, int time, const idBitMsg &msg } return true; } - default: { - return idEntity::ClientReceiveEvent( event, time, msg ); - } + default: + break; } - return false; + + return idEntity::ClientReceiveEvent( event, time, msg ); } /* diff --git a/neo/game/Moveable.cpp b/neo/game/Moveable.cpp index a0517ffd..13bd7be5 100644 --- a/neo/game/Moveable.cpp +++ b/neo/game/Moveable.cpp @@ -1181,15 +1181,14 @@ idExplodingBarrel::ClientReceiveEvent bool idExplodingBarrel::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) { switch( event ) { - case EVENT_EXPLODE: { + case EVENT_EXPLODE: if ( gameLocal.realClientTime - msg.ReadLong() < spawnArgs.GetInt( "explode_lapse", "1000" ) ) { ExplodingEffects( ); } return true; - } - default: { - return idBarrel::ClientReceiveEvent( event, time, msg ); - } + default: + break; } - return false; + + return idBarrel::ClientReceiveEvent( event, time, msg ); } diff --git a/neo/game/Player.cpp b/neo/game/Player.cpp index 0ed61a5c..35350023 100644 --- a/neo/game/Player.cpp +++ b/neo/game/Player.cpp @@ -8263,13 +8263,13 @@ bool idPlayer::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) { // happens if the event and the spectate change are written on the server during the same frame (fraglimit) return true; } - return idActor::ClientReceiveEvent( event, time, msg ); - } - default: { - return idActor::ClientReceiveEvent( event, time, msg ); + break; } + default: + break; } - return false; + + return idActor::ClientReceiveEvent( event, time, msg ); } /* diff --git a/neo/game/Projectile.cpp b/neo/game/Projectile.cpp index 1ac8820d..a0ea4b06 100644 --- a/neo/game/Projectile.cpp +++ b/neo/game/Projectile.cpp @@ -1210,11 +1210,11 @@ bool idProjectile::ClientReceiveEvent( int event, int time, const idBitMsg &msg DefaultDamageEffect( this, spawnArgs, collision, velocity ); return true; } - default: { - return idEntity::ClientReceiveEvent( event, time, msg ); - } + default: + break; } - return false; + + return idEntity::ClientReceiveEvent( event, time, msg ); } /* diff --git a/neo/game/Weapon.cpp b/neo/game/Weapon.cpp index 45b6d6a3..7020ca5e 100644 --- a/neo/game/Weapon.cpp +++ b/neo/game/Weapon.cpp @@ -2329,11 +2329,11 @@ bool idWeapon::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) { } return true; } - default: { - return idEntity::ClientReceiveEvent( event, time, msg ); - } + default: + break; } - return false; + + return idEntity::ClientReceiveEvent( event, time, msg ); } /*********************************************************************** diff --git a/neo/idlib/math/Matrix.h b/neo/idlib/math/Matrix.h index 9b267eac..24ed20f8 100644 --- a/neo/idlib/math/Matrix.h +++ b/neo/idlib/math/Matrix.h @@ -2649,9 +2649,10 @@ ID_INLINE bool idMatX::InverseFastSelf( void ) { case 6: return reinterpret_cast(mat)->InverseFastSelf(); default: - return InverseSelfGeneric(); + break; } - return false; + + return InverseSelfGeneric(); } ID_INLINE idVecX idMatX::Multiply( const idVecX &vec ) const { diff --git a/neo/renderer/Model_lwo.cpp b/neo/renderer/Model_lwo.cpp index 816d7802..aaec035a 100644 --- a/neo/renderer/Model_lwo.cpp +++ b/neo/renderer/Model_lwo.cpp @@ -734,7 +734,6 @@ static float incoming( lwKey *key0, lwKey *key1 ) if ( key1->next ) in *= ( key1->time - key0->time ) / ( key1->next->time - key0->time ); break; - return in; case ID_BEZ2: in = key1->param[ 1 ] * ( key1->time - key0->time ); diff --git a/neo/renderer/Model_ma.cpp b/neo/renderer/Model_ma.cpp index 703fcde4..e31ca404 100644 --- a/neo/renderer/Model_ma.cpp +++ b/neo/renderer/Model_ma.cpp @@ -122,7 +122,6 @@ bool MA_ReadVec3(idParser& parser, idVec3& vec) { idToken token; if(!parser.SkipUntilString("double3")) { throw idException( va("Maya Loader '%s': Invalid Vec3", parser.GetFileName()) ); - return false; } @@ -389,7 +388,6 @@ bool MA_ParseFace(idParser& parser, maAttribHeader_t* header) { int count = parser.ParseInt(); if(count != 3) { throw idException(va("Maya Loader '%s': Face is not a triangle.", parser.GetFileName())); - return false; } //Increment the face number because a new face always starts with an "f" token currentFace++; @@ -408,7 +406,6 @@ bool MA_ParseFace(idParser& parser, maAttribHeader_t* header) { int count = parser.ParseInt(); if(count != 3) { throw idException(va("Maya Loader '%s': Invalid texture coordinates.", parser.GetFileName())); - return false; } pMesh->faces[currentFace].tVertexNum[0] = parser.ParseInt(); pMesh->faces[currentFace].tVertexNum[1] = parser.ParseInt(); @@ -418,7 +415,6 @@ bool MA_ParseFace(idParser& parser, maAttribHeader_t* header) { int count = parser.ParseInt(); if(count != 3) { throw idException(va("Maya Loader '%s': Invalid texture coordinates.", parser.GetFileName())); - return false; } pMesh->faces[currentFace].tVertexNum[0] = parser.ParseInt(); pMesh->faces[currentFace].tVertexNum[1] = parser.ParseInt(); @@ -429,7 +425,6 @@ bool MA_ParseFace(idParser& parser, maAttribHeader_t* header) { int count = parser.ParseInt(); if(count != 3) { throw idException(va("Maya Loader '%s': Invalid vertex color.", parser.GetFileName())); - return false; } pMesh->faces[currentFace].vertexColors[0] = parser.ParseInt(); pMesh->faces[currentFace].vertexColors[1] = parser.ParseInt(); @@ -820,7 +815,6 @@ bool MA_ParseConnectAttr(idParser& parser) { int dot = temp.Find("."); if(dot == -1) { throw idException(va("Maya Loader '%s': Invalid Connect Attribute.", parser.GetFileName())); - return false; } srcName = temp.Left(dot); srcType = temp.Right(temp.Length()-dot-1); @@ -830,7 +824,6 @@ bool MA_ParseConnectAttr(idParser& parser) { dot = temp.Find("."); if(dot == -1) { throw idException(va("Maya Loader '%s': Invalid Connect Attribute.", parser.GetFileName())); - return false; } destName = temp.Left(dot); destType = temp.Right(temp.Length()-dot-1);