WorldSpawn: Throw up a model dialog if prop_dynamic is spawned into a place.
This commit is contained in:
parent
ed1b1d6338
commit
36add9020c
1 changed files with 12 additions and 1 deletions
|
@ -332,11 +332,22 @@ AABB Doom3Light_getBounds(const AABB &workzone)
|
||||||
|
|
||||||
int g_iLastLightIntensity;
|
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)
|
void Entity_createFromSelection(const char *name, const Vector3 &origin)
|
||||||
{
|
{
|
||||||
EntityClass *entityClass = GlobalEntityClassManager().findOrInsert(name, true);
|
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;
|
bool brushesSelected = Scene_countSelectedBrushes(GlobalSceneGraph()) != 0;
|
||||||
|
|
||||||
if (!(entityClass->fixedsize || isModel) && !brushesSelected) {
|
if (!(entityClass->fixedsize || isModel) && !brushesSelected) {
|
||||||
|
|
Loading…
Reference in a new issue