char* CZombie::BuildPathByOffs (const char **list, int off) { static char buf[MAX_PATH]; int len = strlen(STRING(m_iPath)); strncpy(buf, STRING(m_iPath), len); buf[len] = '/'; strcpy(buf + len + 1, list[off]); return (char*)pool.ALLOC_MEM(buf); }
char* CZombie::BuildRandomPath (const char **list) { static char buf[MAX_PATH]; int len = strlen(STRING(m_iPath)); int off = RANDOM_LONG(0, ARRAYSIZE(list) - 1); strncpy(buf, STRING(m_iPath), len); buf[len] = '/'; strcpy(buf + len + 1, list[off]); return (char*)pool.ALLOC_MEM(buf); }