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

Method clearEntity

plugins/dm.objectives/ObjectiveEntity.cpp:514–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512}
513
514void ObjectiveEntity::clearEntity(Entity* entity) {
515 // Get all keyvalues matching the "obj" prefix.
516 Entity::KeyValuePairs keyValues = entity->getKeyValuePairs("obj");
517
518 for (Entity::KeyValuePairs::const_iterator i = keyValues.begin();
519 i != keyValues.end(); ++i)
520 {
521 // Set the spawnarg to empty, which is equivalent to a removal
522 entity->setKeyValue(i->first, "");
523 }
524}
525
526// Write out Objectives to entity keyvals
527void ObjectiveEntity::writeToEntity()

Callers

nothing calls this directly

Calls 4

getKeyValuePairsMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
setKeyValueMethod · 0.45

Tested by

no test coverage detected