.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   RACC (http://forums.bots-united.com/forumdisplay.php?f=11)
-   -   BotAim 2 announced. Best aiming ever. (http://forums.bots-united.com/showthread.php?t=3330)

[NvT]_KaszpiR_ 06-01-2006 14:46

Re: BotAim 2 announced. Best aiming ever.
 
KWo, concering to the verision i run on my serv:
sniper scout works nice
they fail with awp, mayb add extra code to stop bots from funning when holding th eawp and wanting to shoot.

KWo 08-01-2006 10:02

Re: BotAim 2 announced. Best aiming ever.
 
They may fail with awp, because recoil code needs to be re-written. sPlOrYgOn is working on it (when he has time), but it has nothing to botaim2. ;)

dr.death 29-03-2012 22:34

Re: BotAim 2 announced. Best aiming ever.
 
Quote:

Originally Posted by KWo (Post 46088)
They may fail with awp, because recoil code needs to be re-written. sPlOrYgOn is working on it (when he has time), but it has nothing to botaim2. ;)

Just make the bot stop in place before shooting, recoil will be fixed xD:batman:

Cheeseh 01-05-2013 11:07

Re: BotAim 2 announced. Best aiming ever.
 
this is how I do mine in rcbot2. it's similar but no damping, just has a momentum and a 'mouse sensitivity'

Code:

void CBot :: changeAngles ( float fSpeed, float *fIdeal, float *fCurrent, float *fUpdate )
{
        float current = *fCurrent;
        float ideal = *fIdeal;
        float diff;
        float delta;
        float alpha;
        float alphaspeed;

        extern ConVar bot_anglespeed;

        // fSpeed = 1 to 20 (mouse sensitivity)
        alphaspeed = (fSpeed/20);
        alpha = alphaspeed * bot_anglespeed.GetFloat();

        diff = ideal - current;

        if ( diff < -180.0f )
                diff += 360.0f;
        else if ( diff > 180.0f )
                diff -= 360.0f;

        delta = (diff*alpha) + (m_fAimMoment*alphaspeed);

        //check for QNAN
        if ( delta != delta )
                delta = 1.0f;

        m_fAimMoment = (m_fAimMoment * alphaspeed) + (delta * (1.0f-alphaspeed));

        //check for QNAN
        if ( m_fAimMoment != m_fAimMoment )
                m_fAimMoment = 1.0f;

        current = current + delta;

        if ( current > 180.0f )
                current -= 360.0f;
        else if ( current < -180.0f )
                current += 360.0f;

        *fCurrent = current;

        if ( *fCurrent > 180.0f )
                *fCurrent -= 360.0f;
        else if ( *fCurrent < -180.0f )
                *fCurrent += 360.0f;
}

the problem with most of these algorithms are they are all linear as far as I've seen, would be nice to see a bi-linear algorithm

genmac 04-05-2013 07:16

Re: BotAim 2 announced. Best aiming ever.
 
man I wish I know how to code but I really suck on that last time I tried ions ago hehe. glad this forum is still has life in it though not as much compared a decade ago.


All times are GMT +2. The time now is 07:55.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.