fixed map loading for maps with no TERRAIN section (trees)
git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1282 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
@@ -120,6 +120,9 @@ namespace OpenRa.FileFormats
|
|||||||
void ReadTrees( IniFile file )
|
void ReadTrees( IniFile file )
|
||||||
{
|
{
|
||||||
IniSection terrain = file.GetSection( "TERRAIN" );
|
IniSection terrain = file.GetSection( "TERRAIN" );
|
||||||
|
if( terrain == null )
|
||||||
|
return;
|
||||||
|
|
||||||
foreach( KeyValuePair<string, string> kv in terrain )
|
foreach( KeyValuePair<string, string> kv in terrain )
|
||||||
Trees.Add( new TreeReference( int.Parse( kv.Key ), kv.Value ) );
|
Trees.Add( new TreeReference( int.Parse( kv.Key ), kv.Value ) );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user