changed doom3 entity-create to add model key for brush-entities
[xonotic/netradiant.git] / radiant / entity.cpp
index a68827e6bd4603462b7ae0ffd0808f4f508abf10..eb4dea509a246154f6de545a8025a7fe759e152a 100644 (file)
@@ -266,6 +266,11 @@ void Entity_createFromSelection(const char* name, const Vector3& origin)
   {
     Scene_parentSelectedBrushesToEntity(GlobalSceneGraph(), node);
     Scene_forEachChildSelectable(SelectableSetSelected(true), instance.path());
+
+    if (g_pGameDescription->mGameType == "doom3")
+    {
+      Node_getEntity(node)->setKeyValue("model", Node_getEntity(node)->getKeyValue("name"));
+    }
   }
 
   // tweaking: when right clic dropping a light entity, ask for light value in a custom dialog box