From 9cda1adcd486967f65acf3d1ce3833262e04b5bf Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Sat, 28 Aug 2021 15:44:27 +0200 Subject: [PATCH] Editor: Add prop_physics previews, and fix that def files their model= key is respected. --- plugins/entity/eclassmodel.cpp | 1 + plugins/entity/entity.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/entity/eclassmodel.cpp b/plugins/entity/eclassmodel.cpp index 6eeb8ce..0e40ae1 100644 --- a/plugins/entity/eclassmodel.cpp +++ b/plugins/entity/eclassmodel.cpp @@ -86,6 +86,7 @@ void construct() m_keyObservers.insert("angle", AnglesKey::AngleChangedCaller(m_anglesKey)); m_keyObservers.insert("angles", AnglesKey::AnglesChangedCaller(m_anglesKey)); m_keyObservers.insert("origin", OriginKey::OriginChangedCaller(m_originKey)); + m_keyObservers.insert("model", SingletonModel::ModelChangedCaller(m_model)); } // vc 2k5 compiler fix diff --git a/plugins/entity/entity.cpp b/plugins/entity/entity.cpp index 4ae341f..8d2a035 100644 --- a/plugins/entity/entity.cpp +++ b/plugins/entity/entity.cpp @@ -52,7 +52,9 @@ inline scene::Node &entity_for_eclass(EntityClass *eclass) { if ( classname_equal(eclass->name(), "prop_dynamic" ) ) { return New_PropDynamic(eclass); - } if ( classname_equal(eclass->name(), "prop_static" ) ) { + } else if ( classname_equal(eclass->name(), "prop_static" ) ) { + return New_PropStatic(eclass); + } else if ( classname_equal(eclass->name(), "prop_physics" ) ) { return New_PropStatic(eclass); } else if (classname_equal(eclass->name(), "light") || classname_equal(eclass->name(), "lightJunior")) { @@ -61,6 +63,7 @@ inline scene::Node &entity_for_eclass(EntityClass *eclass) || classname_equal(eclass->name(), "lightJunior")) { return New_Light(eclass); } + if (!eclass->fixedsize) { /*if (g_gameType == eGameTypeDoom3) { return New_Doom3Group(eclass);