Hi , I am new here ! I have some question , but before that , I introduced myself , I am a bot CODER , but I DON'T MAKE BOTS ! I just code ! I love PODbot , and I am develop it , I have some question , can u help me ? ???
1.)the bomb plant and defuse issues , I can't seem to fix it
2.)the new bot use the kicked bot's stats
3.)they always stuck on their teammate
4.)sometimes they jump 2 times at a wpt then they move to another and
jump 2 times there , so they just keep jumping in the round
5.)terrible aiming when eney was near !
*I found this code
Code:
//STEVE: instantly adjust aim if reticle near enemy target
if(pBot->STEVE_fire_pattern==1 && (pBot->pBotEnemy != NULL) &&pBot->iAimFlags & AIM_ENEMY)
{
pBot->vecEnemy= BotBodyTarget( pBot->pBotEnemy, pBot);
//old aiming algorithm
Vector vecDirection;
vecDirection = UTIL_VecToAngles(pBot->vecEnemy - GetGunPosition(pBot->pEdict));
vecDirection = vecDirection - pBot->pEdict->v.punchangle;
vecDirection.x = -vecDirection.x;
//new aiming algorithm
Vector vecDirection2;
float hypotenuse = (pBot->vecEnemy - GetGunPosition(pBot->pEdict)).Length();
float opposite = (pBot->vecEnemy.z - GetGunPosition(pBot->pEdict).z);
//arcsin (opposite / hypotenuse)
vecDirection2.x = (180/M_PI) * asin(opposite / hypotenuse);
opposite = (pBot->vecEnemy.y - GetGunPosition(pBot->pEdict).y);
float adjacent = (pBot->vecEnemy.x - GetGunPosition(pBot->pEdict).x);
//arctan (y/x)?
vecDirection2.y = (180/M_PI) * atan(opposite / adjacent);
//hypotenuse not used
// (pBot->vecEnemy - GetGunPosition(pBot->pEdict)).Length2D
float flDot = GetShootingConeDeviation(pBot->pEdict,&pBot->vecEnemy);
if(flDot > 0.90)
{
pBot->pEdict->v.ideal_yaw = vecDirection2.y;
pBot->pEdict->v.idealpitch = vecDirection2.x;
pEdict->v.v_angle.y = pEdict->v.ideal_yaw;
pEdict->v.v_angle.x = pEdict->v.idealpitch;
}
if (vecDirection2 != vecDirection)
SERVER_COMMAND("Old and new aiming algorith disagree!");
}
*I don't know how to mix it with the PODbot's aiming algo
*the original PODbot aiming algo
Code:
edict_t *pEdict = pBot->pEdict;
Vector vecDirection;
vecDirection = UTIL_VecToAngles(vecPos - GetGunPosition(pEdict));
vecDirection = vecDirection - pEdict->v.punchangle;
vecDirection.x = -vecDirection.x;
pEdict->v.ideal_yaw = vecDirection.y;
pEdict->v.idealpitch = vecDirection.x;
THANKS FOR ALL YOUR HELP ! I KNOW YOU ALL ARE ALL GOOOOOODD MAN , AND SORRY FOR MY BAD ENGLISH !