.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   YaPB (http://forums.bots-united.com/forumdisplay.php?f=55)
-   -   YapB's aiming with ChickenMod - suggestion (http://forums.bots-united.com/showthread.php?t=5665)

KWo 29-08-2006 09:02

YapB's aiming with ChickenMod - suggestion
 
In the function Vector CBot::AimPosition (void) You have this:
Code:

float fZComponentUpdate = UsesSniper () ? 15.0 : 17.0;
Vector vTarget = m_pentEnemy->v.origin;

if (g_rgpcvBotCVar[CVAR_HARDCOREMODE]->GetBool ())
      fZComponentUpdate = (UsesSniper () ? 2.32 : UsesPistol () ? 5.0 : (fDistance < 300 ? 4.08 : 6.18)) + fZComponentUpdate;
  else
      fZComponentUpdate = fZComponentUpdate - (0.5 * (100.0 - m_iSkill)

(...)
      // now take in account different parts of enemy body
      if (m_ucVisibility & (VISIBLE_HEAD | VISIBLE_BODY)) // visible head & body
      {
        // now check is our skill match to aim at head, else aim at enemy body
        if ((RandomLong (1, 100) < g_rgkSkillTab[m_iSkill / 20].iHeadshotFrequency) || UsesPistol ())
            vTarget = vTarget + Vector (0, 0, fZComponentUpdate);
        else
            vTarget = vTarget;
      }
      else if (m_ucVisibility & VISIBLE_HEAD) // visible only head
        vTarget = vTarget + Vector (0, 0, fZComponentUpdate);

The bot aims perfectly against the "normal size" bots or players, but it fails with the players/bots using some fun models - for example ChickenMod. The yabp is always trying to hit the head above real head of the chicken, which makes them impossible to hit an enemy.
You need to use
pEdict->v.view_ofs + {0,0,fZNewComponentUpdate} value instead of pEdict->v.origin + {0,0,fZComponentUpdate}.
fZNewComponentUpdate - the new offset for "Z" axis.

jeefo 29-08-2006 15:08

Re: YapB's aiming with ChickenMod - suggestion
 
Never used chickenmod before, i'll install and test it in a few days :)

Thank you.. ;)

KWo 29-08-2006 18:47

Re: YapB's aiming with ChickenMod - suggestion
 
You can just use my All-In-One installer - it's a zip file with mm1.19, latest AMX X 1.75a and pb mm V3. There are few helpful plugins with testing bots as ATAC, ChickenMod and CSDM. You can control them from amxmodmenu (last - third - page).

KWo 30-08-2006 09:07

Re: YapB's aiming with ChickenMod - suggestion
 
Quote:

Originally Posted by KWo
You need to use
pEdict->v.view_ofs + {0,0,fZNewComponentUpdate} value instead of pEdict->v.origin + {0,0,fZComponentUpdate}.
fZNewComponentUpdate - the new offset for "Z" axis.

I meant of course - in Your case - You need to use:
m_pentEnemy->v.view_ofs + {0,0,fZNewComponentUpdate}


All times are GMT +2. The time now is 00:34.

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