Ok, but, even if this is possible, I cant quite get it right.
In function "void CBaseBot::BuyStuff()" that is in bot_ai.cpp after the line
Code:
int* ptrWeaponTab = ptrWeaponPrefs[m_ucPersonality] + NUM_WEAPONS;
I added
Code:
int i;
char *pszStart;
char *pszEnd;
switch (m_ucPersonality)
{
case PERSONALITY_NORMAL:
pszStart = (char *)CVAR_GET_STRING("sb_norwepprefs");
for (i = 0; i < NUM_WEAPONS; i++)
{
pszEnd = strchr(pszStart, ',');
*ptrWeaponTab++ = atoi(pszStart);
pszStart = pszEnd + 1;
}
break;
case PERSONALITY_AGRESSIVE:
pszStart = (char *)CVAR_GET_STRING("sb_agrwepprefs");
for (i = 0; i < NUM_WEAPONS; i++)
{
pszEnd = strchr(pszStart, ',');
*ptrWeaponTab++ = atoi(pszStart);
pszStart = pszEnd + 1;
}
break;
case PERSONALITY_DEFENSIVE:
pszStart = (char *)CVAR_GET_STRING("sb_defwepprefs");
for (i = 0; i < NUM_WEAPONS; i++)
{
pszEnd = strchr(pszStart, ',');
*ptrWeaponTab++ = atoi(pszStart);
pszStart = pszEnd + 1;
}
break;
}
and the result is that when a bot tries to buy a weapon the game crashes with runtime error