Alright so I ended up compiling my own version for CS:S again, I wrote a simple plugin against it and for whatever reason it's not working as intended. Am I doing something wrong or is the extension bugged?
Here is the dumbed down code (see attached for full source)
PHP Code:
public Action OnShouldBotAttackPlayer(int bot, int player, bool &result)
{
if (!IsPlayerAlive(player) || !IsPlayerAlive(bot))
{
return Plugin_Continue;
}
bool isBotZombie = ZR_IsClientZombie(bot);
bool isTargetZombie = ZR_IsClientZombie(player);
if (isBotZombie != isTargetZombie)
{
if (!result)
{
result = true;
}
return Plugin_Changed;
}
result = false;
return Plugin_Changed;
}
And this is what I end up seeing in console:
Code:
Reaper (2) wants to attack Cabbie (2)
Cabbie (2) wants to attack Reaper (2)
With both bots being Zombies.
It makes no sense as the plugin correctly detects that they're both on the same team and sets the result to false, yet they still end up stabbing each other non stop. What am I doing wrong?