diff --git a/bot/waypoints/ac_desert2.wpt b/bot/waypoints/ac_desert2.wpt new file mode 100644 index 00000000..b39a320b Binary files /dev/null and b/bot/waypoints/ac_desert2.wpt differ diff --git a/source/src/bot/bot_ai.cpp b/source/src/bot/bot_ai.cpp index ebb073bc..a83a6144 100644 --- a/source/src/bot/bot_ai.cpp +++ b/source/src/bot/bot_ai.cpp @@ -1953,12 +1953,11 @@ void CBot::HearSound(int n, vec *o) // Has the bot already an enemy? if (m_pMyEnt->enemy) return; - // Is the sound not interesting? -//fixmebot -/* if ((n==S_DIE1) || (n==S_DIE2) || (n==S_DEATHR) || (n==S_DEATHE) || (n==S_DEATHS) || - (n==S_DEATHB) || (n==S_DEATHH) || (n==S_DEATHD) || (n==S_PIGGR2)) - return;*/ - + + //fixmebot + // Is the sound not interesting? + if(n == S_DIE1 || n == S_DIE2) return; + int soundvol = m_pBotSkill->iMaxHearVolume - (int)(GetDistance(*o)*3*m_pBotSkill->iMaxHearVolume/255); diff --git a/source/src/bot/botmanager.cpp b/source/src/bot/botmanager.cpp index 9ec7b54e..89d50f0a 100644 --- a/source/src/bot/botmanager.cpp +++ b/source/src/bot/botmanager.cpp @@ -382,9 +382,7 @@ void CBotManager::LetBotsUpdateStats() void CBotManager::LetBotsHear(int n, vec *loc) { - if (bots.length() == 0) return; - - if (!loc) return; + if (bots.length() == 0 || !loc) return; loopv(bots) { diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index fe4ef762..6d6dcc75 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -325,7 +325,7 @@ int findplayerstart(playerent *d) int r = fixspawn-->0 ? 4 : rnd(10)+1; if(m_teammode) loopi(r) spawncycle = findentity(PLAYERSTART, spawncycle+1, rb_team_int(d->team)); - else if(m_arena) loopi(r) spawncycle = findentity(PLAYERSTART, spawncycle+1); + else if(m_arena) loopi(r) spawncycle = findentity(PLAYERSTART, spawncycle+1, 100); else { int bestent = -1; diff --git a/source/src/entities.cpp b/source/src/entities.cpp index 0ce3edc5..31a17c72 100644 --- a/source/src/entities.cpp +++ b/source/src/entities.cpp @@ -278,30 +278,13 @@ void equip(playerent *d) { d->ammo[GUN_PISTOL] = itemstats[GUN_PISTOL].max-magsize(GUN_PISTOL); d->mag[GUN_PISTOL] = magsize(GUN_PISTOL); - } + }; + if(!m_noprimary) { d->ammo[d->primary] = itemstats[d->primary].start-magsize(d->primary); d->mag[d->primary] = magsize(d->primary); - } - - /* - if(m_pistol) // pistol only mode - { - d->ammo[GUN_PISTOL] = itemstats[GUN_PISTOL].max-magsize(GUN_PISTOL); - d->mag[GUN_PISTOL] = magsize(GUN_PISTOL); - } - else if(m_lss) - { - d->mag[d->primary] = d->mag[GUN_PISTOL] = 0; - } - else if(!m_noguns) - { - d->ammo[GUN_PISTOL] = itemstats[GUN_PISTOL].start-magsize(GUN_PISTOL); - d->mag[GUN_PISTOL] = magsize(GUN_PISTOL); - d->ammo[d->primary] = itemstats[d->primary].start-magsize(d->primary); - d->mag[d->primary] = magsize(d->primary); - };*/ + }; if (d->hasarmour) { diff --git a/source/src/rendertext.cpp b/source/src/rendertext.cpp index 307b5f91..5639fbf8 100644 --- a/source/src/rendertext.cpp +++ b/source/src/rendertext.cpp @@ -206,7 +206,6 @@ void draw_text(const char *str, int left, int top) switch(str[i+1]) { case '0': glColor3ub(64,255,128); i++; continue; // green: player talk - case '1': glColor3ub(96,160,255); i++; continue; // blue: "echo" command case '2': glColor3ub(255,192,64); i++; continue; // yellow: gameplay action messages, only actions done by players case '3': glColor3ub(255,64,64); i++; continue; // red: important errors default: continue; // white: everything else diff --git a/source/src/sound.cpp b/source/src/sound.cpp index 041a56b0..cb78703b 100644 --- a/source/src/sound.cpp +++ b/source/src/sound.cpp @@ -1,6 +1,7 @@ // sound.cpp: uses fmod on windows and sdl_mixer on unix (both had problems on the other platform) #include "cube.h" +#include "bot/bot.h" //#ifndef WIN32 // NOTE: fmod not being supported for the moment as it does not allow stereo pan/vol updating during playback #define USE_MIXER @@ -211,6 +212,7 @@ void playsound(int n, vec *loc) if(nosound) return; if(!soundvol) return; if(n==S_NULL) return; + if(m_botmode) BotManager.LetBotsHear(n, loc); if(lastmillis==lastsoundmillis) soundsatonce++; else soundsatonce = 1; lastsoundmillis = lastmillis; if(soundsatonce>5) return; // avoid bursts of sounds with heavy packetloss and in sp