From 36add9020c24cf9b028e1feb51200e9ef8022d74 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Thu, 20 Jan 2022 15:01:52 -0800 Subject: [PATCH] WorldSpawn: Throw up a model dialog if prop_dynamic is spawned into a place. --- src/entity.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/entity.cpp b/src/entity.cpp index 2723fb0..5c8342b 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -332,11 +332,22 @@ AABB Doom3Light_getBounds(const AABB &workzone) int g_iLastLightIntensity; +bool +Entity_isModelEntity(const char *name) +{ + if (string_equal_nocase(name, "prop_static")) + return true; + else if (string_equal_nocase(name, "prop_dynamic")) + return true; + + return false; +} + void Entity_createFromSelection(const char *name, const Vector3 &origin) { EntityClass *entityClass = GlobalEntityClassManager().findOrInsert(name, true); - bool isModel = string_equal_nocase(name, "prop_static"); + bool isModel = Entity_isModelEntity(name); bool brushesSelected = Scene_countSelectedBrushes(GlobalSceneGraph()) != 0; if (!(entityClass->fixedsize || isModel) && !brushesSelected) {