void PartSysParser::ParseParticleLifespan(const TabFileRecord& record, PartSysEmitterSpecPtr emitter) { auto colLifespan = record[COL_PART_LIFESPAN]; float lifespan; if (!colLifespan || colLifespan.EqualsIgnoreCase("perm")) { emitter->SetPermanentParticles(true); emitter->SetParticleLifespan(1.0f); } else if (colLifespan.TryGetFloat(lifespan)) { emitter->SetParticleLifespan(lifespan / 30.0f); } else { logger->warn("Emitter on line {} has invalid particle lifespan: '{}'", record.GetLineNumber(), colLifespan); } }
BOOL CChars::EqualsIgnoreCase(CChars szString) { return EqualsIgnoreCase(szString.Text()); }