Browse Source

Unit w/o components is also a unit

Daniele Bartolini 9 years ago
parent
commit
906cd0c7f3
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/resource/unit_compiler.cpp

+ 2 - 2
src/resource/unit_compiler.cpp

@@ -280,9 +280,9 @@ void UnitCompiler::compile_unit_from_json(const char* json)
 			Buffer buf = compile_component(type, component["data"]);
 			add_component_data(type, buf, _num_units);
 		}
-
-		++_num_units;
 	}
+
+	++_num_units;
 }
 
 void UnitCompiler::compile_multiple_units(const char* json)