.:: Bots United ::.  
filebase forums irc server wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps waypoints yapb

Go Back   .:: Bots United ::. > Cyborg Factory > POD-Bot mm > Common Questions
Common Questions Are you seeking help ? Get it here !

Reply
 
Thread Tools
Re: Turn off Bots shooting back after Teamattack
Old
  (#41)
RoboCop
vBulletin Veteran
 
Status: Offline
Posts: 139
Join Date: Feb 2013
Location: Dundee, Scotland
Default Re: Turn off Bots shooting back after Teamattack - 5 Days Ago

I've recompiled POD-Bot again, also just to make things easier I've included both Debug and Optimised builds in this zip for both Win32 and Linux servers. They will maybe need to be monitored for any crashes or instablity issues. But those are the Metamod plugins I'm using for my CS 1.6 server:-

] meta list
Currently running plugins:
[ 1] Adminmod, v2.50.61-beta5 (MM), Mar 1 2018, by Alfred Reynolds & RoboCop <robocop@lycos.co.uk>, see www.adminmod.org
[ 2] LogDaemon, v1.0.0.7, 2015/11/30, by Will Day <willday@metamod.org>, Tim Thelin, <Kndroc@hotmail.com>, Pieter de Zwart,
[ 3] AGuard, v1.6, Nov 30 2017, by Nikolay <SpooK> Milkov, see http://www.nmsoft.ml/
[ 4] AMX Mod X, v1.8.2, Feb 14 2013, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 5] POD-Bot mm, vV3B23-APG, Jun 14 2018, by Count Floyd & Bots United, see http://www.bots-united.com
Attached Files
File Type: zip podbot.zip (1,007.3 KB, 1 views)





vBulletin Webmaster since 2001
  
Reply With Quote
Re: Turn off Bots shooting back after Teamattack
Old
  (#42)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,421
Join Date: Apr 2004
Default Re: Turn off Bots shooting back after Teamattack - 5 Days Ago

After rethinking the problem and the logic the conclusion is:
the first idea was correct (and the comparator direction). I have added yet some code to depand the shoot back time on the current bot's aggression level. Finaly - after limited testing time - the code should look like this:

PHP Code:
   if (!FNullEnt (tr.pHit))
   {
      
ENTINDEX (tr.pHit) - 1;
      if ((
>= 0) && (gpGlobals->maxClients))  // KWo - 13.03.2006
      
{
         if ((
clients[i].iTeam == pBot->bot_team
            && ((
pEdict->v.dmg_inflictor != clients[i].pEdict) || ((pEdict->v.dmgtime 1.5 pBot->fAgressionLevel) <= gpGlobals->time))
            && ((
clients[i].iFlags CLIENT_ALIVE) || (clients[i].fDeathTime >= gpGlobals->time)))  // KWo - 13.06.2018
         
{
            if (
g_b_DebugCombat)
               
ALERT (at_logged,"[DEBUG] FireHurtsFriend - Bot %s cannot fire because it may hurt its friend %s (1).\n"pBot->nameSTRING (clients[i].pEdict->v.netname));

            return (
TRUE);
         }
      }
   } 
Sorry for confusion and the useless work with compliling and uploading binaries. The code should be tested first by the author, then - by users. Unfortunately I don't have enough time to do it so.
I have also added a code to increase the bot aggessivity when the teamnate is shooting at it. In botclient.cpp in the function BotClient_CS_Damage

PHP Code:
               if ((UTIL_GetTeam (pEnt) == pBot->bot_team) && (!g_b_cv_ffa)) // KWo - 05.10.2006
               
{
                  
// FIXFIXFIXFIXFIXME: THIS IS BLATANTLY CHEATING!!!!
                  // KWo - No - it's when Your teamnate is attacking You, then the bot may consider You as an enemy
                  // but BotHurtsFriends function doesn't let him to shoot at You...
                  
if (RANDOM_LONG (1100) < 10)
                  {
                     if (
FNullEnt (pBot->pLastEnemy) && FNullEnt (pBot->pBotEnemy)
                        && (
pBot->f_bot_see_enemy_time 3.0 gpGlobals->time)
                        && (
pBot->f_blind_time gpGlobals->time)) // KWo - 23.03.2008
                     
{
//                        pBot->iAimFlags |= AIM_ENEMY; // KWo - 27.08.2006
//                        pBot->iAimFlags |= AIM_LASTENEMY; // KWo - 27.08.2006
                        
pBot->f_heard_sound_time gpGlobals->time;
//                      pBot->pBotEnemy = pEnt;
                        
pBot->pLastEnemy pEnt;
                        
pBot->vecLastEnemyOrigin pEnt->v.origin;
                        
pBot->vecLastEnemyOrigin.+= RANDOM_FLOAT(-200.0,200.0);  // KWo - 12.08.2007
                        
pBot->vecLastEnemyOrigin.+= RANDOM_FLOAT(-200.0,200.0);  // KWo - 12.08.2007
                        
pBot->fLastHeardEnOrgUpdateTime gpGlobals->time 1.0;

                        
pBot->fAgressionLevel += 0.1;   // KWo - 14.06.2018
                        
if (pBot->fAgressionLevel 1.0// KWo - 14.06.2018
                           
pBot->fAgressionLevel 1.0;

                     }
                  }
               } 
That should do the job correctly.
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com