.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps 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)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Re: Turn off Bots shooting back after Teamattack - 13-06-2018

That fix could not work because of the wrong comparing direction...

It should be done this way:
PHP Code:
((pEdict->v.dmg_inflictor != clients[i].pEdict) || (pEdict->v.dmgtime 1.5 >= gpGlobals->time)) 
That should work better...
Sorry...
  
Reply With Quote
Re: Turn off Bots shooting back after Teamattack
Old
  (#42)
RoboCop
vBulletin Veteran
 
RoboCop's Avatar
 
Status: Offline
Posts: 217
Join Date: Feb 2013
Location: Dundee, Scotland
Default Re: Turn off Bots shooting back after Teamattack - 14-06-2018

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, 676 views)





vBulletin Webmaster since 2001
  
Reply With Quote
Re: Turn off Bots shooting back after Teamattack
Old
  (#43)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Re: Turn off Bots shooting back after Teamattack - 14-06-2018

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
Re: Turn off Bots shooting back after Teamattack
Old
  (#44)
RoboCop
vBulletin Veteran
 
RoboCop's Avatar
 
Status: Offline
Posts: 217
Join Date: Feb 2013
Location: Dundee, Scotland
Default Re: Turn off Bots shooting back after Teamattack - 24-06-2018

Err are you able to point out which line number they are located, please?





vBulletin Webmaster since 2001
  
Reply With Quote
Re: Turn off Bots shooting back after Teamattack
Old
  (#45)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Re: Turn off Bots shooting back after Teamattack - 24-06-2018

The file is botclient.cpp. The function is BotClient_CS_Damage. Lines 403..427.
The line 403:
PHP Code:
if ((UTIL_GetTeam (pEnt) == pBot->bot_team) && (!g_b_cv_ffa)) // KWo - 05.10.2006 
starts the check if the teamnate was the particular bot's attacker.
Lines 424..427 are added lines posted in my previous post.
PHP Code:
pBot->fAgressionLevel += 0.1;   // KWo - 14.06.2018
if (pBot->fAgressionLevel 1.0)   // KWo - 14.06.2018
   
pBot->fAgressionLevel 1.0;   // KWo - 14.06.2018 
  
Reply With Quote
Re: Turn off Bots shooting back after Teamattack
Old
  (#46)
RoboCop
vBulletin Veteran
 
RoboCop's Avatar
 
Status: Offline
Posts: 217
Join Date: Feb 2013
Location: Dundee, Scotland
Default Re: Turn off Bots shooting back after Teamattack - 25-06-2018

OK thanks I've recompiled those builds and added that new script and for the '[DEBUG] FireHurtsFriend - Bot %s cannot fire because it may hurt its friend %s (1).\n' as well. Feel free to test them, also if you want to check those bots in my CS 1.6 server let me know.
Attached Files
File Type: zip podbot-beta.zip (1.01 MB, 673 views)





vBulletin Webmaster since 2001
  
Reply With Quote
Re: Turn off Bots shooting back after Teamattack
Old
  (#47)
joeysmile
BRUT.me
 
Status: Offline
Posts: 25
Join Date: Aug 2013
Default Re: Turn off Bots shooting back after Teamattack - 26-06-2018

Hi,
great news and thank you for your effort, but the last beta version does not work, no bot will appear on the map, we needed to revert it to the last version, does someone have such problems too?
  
Reply With Quote
Re: Turn off Bots shooting back after Teamattack
Old
  (#48)
RoboCop
vBulletin Veteran
 
RoboCop's Avatar
 
Status: Offline
Posts: 217
Join Date: Feb 2013
Location: Dundee, Scotland
Default Re: Turn off Bots shooting back after Teamattack - 27-06-2018

Oh it seems to run fine on my side, even though I'm testing those bots in Debug Mode with the POD-Bot Debug build and using GDB for CS 1.6 Linux.

Any other problems?





vBulletin Webmaster since 2001
  
Reply With Quote
Re: Turn off Bots shooting back after Teamattack
Old
  (#49)
joeysmile
BRUT.me
 
Status: Offline
Posts: 25
Join Date: Aug 2013
Default Re: Turn off Bots shooting back after Teamattack - 28-06-2018

I am using normal version and windows OS, they did not appear on the map at all, so I use the last stable build with the shooting back for now :/ other people with experiences on windows build, what should be wrong?
  
Reply With Quote
Re: Turn off Bots shooting back after Teamattack
Old
  (#50)
RoboCop
vBulletin Veteran
 
RoboCop's Avatar
 
Status: Offline
Posts: 217
Join Date: Feb 2013
Location: Dundee, Scotland
Default Re: Turn off Bots shooting back after Teamattack - 28-06-2018

Weird they seem to be working on my Windows 10 PC Listenserver...Also try this zip...it contains Metamod-P37 along with the latest Windows build and Debug build of POD-Bot.
Attached Files
File Type: 7z addons.7z (1.30 MB, 738 views)





vBulletin Webmaster since 2001
  
Reply With Quote
Reply


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

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 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com