Splits the full path into name of particle and it's directory path, then registers the particle with the name and returns its ID Called by C++
Silently fail on retail, game already takes too long to boot, lets not make it longer
TODO(kumarjac): bake in this error
См. определение в файле ParticleList.c строка 385
386 {
388#ifdef DIAG_DEVELOPER
389 if (fullPath.
Replace(
"\\",
"/") > 0)
390 {
391 ErrorEx(
string.Format(
"Using wrong path delimiter for particle registering! Use '/' instead of '\\'. fullPath=%1", fullPath),
ErrorExSeverity.WARNING);
392 }
393#endif
394
396 if (lastIndex < 0)
397 {
399#ifdef WAITING_FOR_PBOS_TO_BE_UPDATED
401 return ParticleList.INVALID;
402#else
404#endif
405 }
406
407
408
409 string rootPath = fullPath.
Substring(0, lastIndex + 1);
410 string fileName = fullPath.
Substring(lastIndex + 1, fullPath.
Length() - (lastIndex + 1));
411
413 }
static string GetPathToParticles()
Returns base path to all particles.
static int RegisterParticle(string file_name)
static int RegisterParticleByFullPath(string fullPath)
proto native int Length()
Returns length of string.
proto int Replace(string sample, string replace)
Replace all occurrances of 'sample' in 'str' by 'replace'.
proto native int LastIndexOf(string sample)
Finds last 'sample' in 'str'. Returns -1 when not found.
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.
Перекрестные ссылки ErrorEx, GetPathToParticles(), INVALID, string::LastIndexOf(), string::Length(), RegisterParticle(), RegisterParticleByFullPath(), string::Replace() и string::Substring().
Используется в RegisterParticleByFullPath().