Exemplo n.º 1
0
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);
}
Exemplo n.º 2
0
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);
}