From ed1ffa8060e16df4d2be9ef206c921ebf922fffc Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Sun, 13 May 2012 14:40:11 +0200 Subject: [PATCH] Fix several bugs from iodoom3 bugtracker Apply 94cd0ee5 to d3xp as well. --- d3xp/Game_local.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/d3xp/Game_local.cpp b/d3xp/Game_local.cpp index 4de1d0b..ed4d7cf 100644 --- a/d3xp/Game_local.cpp +++ b/d3xp/Game_local.cpp @@ -1387,8 +1387,8 @@ bool idGameLocal::InitFromSaveGame( const char *mapName, idRenderWorld *renderWo if ( !InhibitEntitySpawn( mapEnt->epairs ) ) { CacheDictionaryMedia( &mapEnt->epairs ); - const char *classname = mapEnt->epairs.GetString( "classname" ); - if ( classname != '\0' ) { + const char *classname; + if ( mapEnt->epairs.GetString( "classname", "", &classname ) ) { FindEntityDef( classname, false ); } } @@ -1799,8 +1799,9 @@ void idGameLocal::GetShakeSounds( const idDict *dict ) { const char *soundShaderName; idStr soundName; - soundShaderName = dict->GetString( "s_shader" ); - if ( soundShaderName != '\0' && dict->GetFloat( "s_shakes" ) != 0.0f ) { + if ( dict->GetString( "s_shader", "", &soundShaderName ) + && dict->GetFloat( "s_shakes" ) != 0.0f ) + { soundShader = declManager->FindSound( soundShaderName ); for ( int i = 0; i < soundShader->GetNumSounds(); i++ ) {