fixed doom3 func_static creation bugs

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@94 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
spog
2006-07-22 15:24:20 +00:00
parent e87a0b240c
commit 988b2f6fbc
3 changed files with 7 additions and 5 deletions

View File

@@ -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