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

Method copyFrom

radiantcore/particles/ParticleDef.cpp:88–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88void ParticleDef::copyFrom(const Ptr& other)
89{
90 ensureParsed();
91
92 {
93 // Suppress signals until we're done copying
94 util::ScopedBoolLock changeLock(_blockChangedSignal);
95
96 setDepthHack(other->getDepthHack());
97
98 _stages.clear();
99
100 // Copy each stage
101 for (std::size_t i = 0; i < other->getNumStages(); ++i)
102 {
103 auto stage = std::make_shared<StageDef>();
104 stage->copyFrom(other->getStage(i));
105
106 appendStage(stage);
107 }
108 }
109
110 // We've changed all the stages, so emit the changed signal now (#4411)
111 onParticleChanged();
112}
113
114bool ParticleDef::isEqualTo(const Ptr& other)
115{

Callers

nothing calls this directly

Calls 4

getDepthHackMethod · 0.80
getStageMethod · 0.80
clearMethod · 0.45
getNumStagesMethod · 0.45

Tested by

no test coverage detected