MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / create

Method create

test/Entity.cpp:38–48  ·  view source on GitHub ↗

Create an entity with the given class name

Source from the content-addressed store, hash-verified

36
37 // Create an entity with the given class name
38 static TestEntity create(const std::string& className)
39 {
40 TestEntity result;
41 result.node = algorithm::createEntityByClassName(className);
42 result.spawnArgs = &result.node->getEntity();
43
44 // Enable undo
45 scene::addNodeToContainer(result.node, GlobalMapModule().getRoot());
46
47 return result;
48 }
49
50 // Access the spawnargs
51 Entity& args() { return *spawnArgs; }

Callers

nothing calls this directly

Calls 4

createEntityByClassNameFunction · 0.85
addNodeToContainerFunction · 0.85
getEntityMethod · 0.45
getRootMethod · 0.45

Tested by

no test coverage detected