X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=radiant%2Fentity.cpp;h=6fb499fd35589d202661a177d148b993a2534ce0;hp=eb4dea509a246154f6de545a8025a7fe759e152a;hb=988b2f6fbcd2e28920ed4e44c8e92481be13c011;hpb=e87a0b240ced111ea9dc3620cf053b8c8e4fdef3 diff --git a/radiant/entity.cpp b/radiant/entity.cpp index eb4dea50..6fb499fd 100644 --- a/radiant/entity.cpp +++ b/radiant/entity.cpp @@ -246,7 +246,7 @@ void Entity_createFromSelection(const char* name, const Vector3& origin) entitypath.push(makeReference(node.get())); scene::Instance& instance = findInstance(entitypath); - if(entityClass->fixedsize) + if(entityClass->fixedsize || (isModel && !brushesSelected)) { Select_Delete(); @@ -264,13 +264,13 @@ void Entity_createFromSelection(const char* name, const Vector3& origin) } else { - 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")); } + + Scene_parentSelectedBrushesToEntity(GlobalSceneGraph(), node); + Scene_forEachChildSelectable(SelectableSetSelected(true), instance.path()); } // tweaking: when right clic dropping a light entity, ask for light value in a custom dialog box