I have the problem that my podbots glitch inside a wall when the bot is beeing hit many times,
since nobody seems to know what it might cause i descided to write this fix but it's not working:
PHP Code:
//plugin init
set_task(2.0, "Check_BotStuck",_,_,_,"b");
public Check_BotStuck()
{
static iNum, iPlayers[32], iPlayer, i;
get_players(iPlayers, iNum, "ade", "TERRORIST");
for( i = 0; i < iNum; i++ )
{
new g_TempOrigin[3];
get_user_origin(iPlayer, g_TempOrigin );
if( g_TempOrigin[iPlayer] == g_AlienOrigin[iPlayer] )
{
g_iSameOriginCount[iPlayer]++;
if( g_iSameOriginCount[iPlayer] == 4 )
{
ExecuteHamB(Ham_CS_RoundRespawn, iPlayer);
g_iSameOriginCount[iPlayer] = 0;
}
}
else {
g_AlienOrigin[iPlayer] = g_TempOrigin[iPlayer];
g_iSameOriginCount[iPlayer] = 0;
}
}
}
ingame nothing happens they just stay stuck inside the wall till next round begins
__________________