Skip to content

Commit

Permalink
#5456: Insert func_animate if a modelDef was chosen in the ModelSelec…
Browse files Browse the repository at this point in the history
…tor.
  • Loading branch information
codereader committed Jan 23, 2021
1 parent a1f2500 commit 6eba35a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions radiant/ui/ortho/OrthoContextMenu.cpp
Expand Up @@ -41,7 +41,8 @@ namespace {
/* CONSTANTS */

const char* LIGHT_CLASSNAME = "light";
const char* MODEL_CLASSNAME = "func_static";
const char* MODEL_CLASSNAME_ANIMATED = "func_animate";
const char* MODEL_CLASSNAME_STATIC = "func_static";
const char* SPEAKER_CLASSNAME = "speaker";
const char* PLAYERSTART_CLASSNAME = "info_player_start";

Expand Down Expand Up @@ -416,8 +417,12 @@ void OrthoContextMenu::callbackAddModel()

try
{
auto modelDef = GlobalEntityClassManager().findModel(ms.model);

auto className = modelDef ? MODEL_CLASSNAME_ANIMATED : MODEL_CLASSNAME_STATIC;

auto modelNode = GlobalEntityModule().createEntityFromSelection(
MODEL_CLASSNAME, _lastPoint
className, _lastPoint
);

//Node_getTraversable(GlobalSceneGraph().root())->insert(modelNode);
Expand Down

0 comments on commit 6eba35a

Please sign in to comment.