mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-03-21 18:21:08 +00:00
Fix "unreachable code" warnings
This commit is contained in:
parent
33bb970596
commit
6d6c5c8ce7
24 changed files with 184 additions and 198 deletions
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -2649,9 +2649,10 @@ ID_INLINE bool idMatX::InverseFastSelf( void ) {
|
|||
case 6:
|
||||
return reinterpret_cast<idMat6 *>(mat)->InverseFastSelf();
|
||||
default:
|
||||
return InverseSelfGeneric();
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
|
||||
return InverseSelfGeneric();
|
||||
}
|
||||
|
||||
ID_INLINE idVecX idMatX::Multiply( const idVecX &vec ) const {
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue