Skip to content

Commit

Permalink
#5787: func_smoke need to have the "smoke" property set instead of "m…
Browse files Browse the repository at this point in the history
…odel".
  • Loading branch information
codereader committed Apr 3, 2022
1 parent 6449407 commit 234b774
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions radiant/ui/ortho/OrthoContextMenu.cpp
Expand Up @@ -40,7 +40,6 @@ namespace {
const char* LIGHT_CLASSNAME = "light";
const char* MODEL_CLASSNAME_ANIMATED = "func_animate";
const char* MODEL_CLASSNAME_STATIC = "func_static";
const char* PARTICLE_EMITTER_CLASSNAME = "func_emitter";
const char* PLAYERSTART_CLASSNAME = "info_player_start";

const char* ADD_ENTITY_TEXT = N_("Create Entity...");
Expand Down Expand Up @@ -370,7 +369,7 @@ void OrthoContextMenu::callbackAddModel()

void OrthoContextMenu::callbackAddParticle()
{
UndoableCommand command("addParticle");
UndoableCommand command("Create Particle");

// Display the particle selector and block waiting for a selection (may be empty)
auto result = ParticleChooserDialog::ChooseParticleAndEmitter();
Expand All @@ -381,7 +380,8 @@ void OrthoContextMenu::callbackAddParticle()
{
auto node = GlobalEntityModule().createEntityFromSelection(result.selectedClassname, _lastPoint);

node->getEntity().setKeyValue("model", result.selectedParticle);
auto modelSpawnarg = result.selectedClassname == "func_smoke" ? "smoke" : "model";
node->getEntity().setKeyValue(modelSpawnarg, result.selectedParticle);
}
catch (cmd::ExecutionFailure& e)
{
Expand Down

0 comments on commit 234b774

Please sign in to comment.