]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
fixed doom3 func_static creation bugs
authorspog <spog>
Sat, 22 Jul 2006 15:24:20 +0000 (15:24 +0000)
committerspog <spog>
Sat, 22 Jul 2006 15:24:20 +0000 (15:24 +0000)
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@94 8a3a26a2-13c4-0310-b231-cf6edde360e5

CHANGES
plugins/entity/doom3group.cpp
radiant/entity.cpp

diff --git a/CHANGES b/CHANGES
index 2c2ad86795a9a1556db138a6da05298eed70e5ec..71adb8462ad383dd5c54741a5f54881118bfb4dd 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,8 @@ SPoG
 - Fixed doom3 func_static with model not appearing to move when dragged. 
 - Changed ASE model loader to parse material names the same way as DoomEdit.
 - Fixed title of wait-dialog when loading a model.
 - Fixed doom3 func_static with model not appearing to move when dragged. 
 - Changed ASE model loader to parse material names the same way as DoomEdit.
 - Fixed title of wait-dialog when loading a model.
+- Fixed doom3 func_static with blank 'model' key being invisible.
+- Changed doom3 func_static model creation to replace selected models.
 
 09/07/2006
 Shaderman
 
 09/07/2006
 Shaderman
index 4fbc0ccfb7b20c86162408f75b2132c0489d094a..c8a0b8cf1fe821bed251fec7d759fce339c6e573 100644 (file)
@@ -198,7 +198,7 @@ private:
 
   void updateIsModel()
   {
 
   void updateIsModel()
   {
-    setIsModel(!string_empty(m_modelKey.c_str()) && !string_equal(m_modelKey.c_str(), m_name.c_str()));
+    setIsModel(!string_equal(m_modelKey.c_str(), m_name.c_str()));
   }
 
   void nameChanged(const char* value)
   }
 
   void nameChanged(const char* value)
index eb4dea509a246154f6de545a8025a7fe759e152a..6fb499fd35589d202661a177d148b993a2534ce0 100644 (file)
@@ -246,7 +246,7 @@ void Entity_createFromSelection(const char* name, const Vector3& origin)
   entitypath.push(makeReference(node.get()));
   scene::Instance& instance = findInstance(entitypath);
 
   entitypath.push(makeReference(node.get()));
   scene::Instance& instance = findInstance(entitypath);
 
-  if(entityClass->fixedsize)
+  if(entityClass->fixedsize || (isModel && !brushesSelected))
   {
     Select_Delete();
     
   {
     Select_Delete();
     
@@ -264,13 +264,13 @@ void Entity_createFromSelection(const char* name, const Vector3& origin)
   }
   else
   {
   }
   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"));
     }
     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
   }
 
   // tweaking: when right clic dropping a light entity, ask for light value in a custom dialog box