no message

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@767 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2006-12-06 20:46:06 +00:00
parent 6b3a99bf19
commit 0feaa049cf
7 changed files with 12 additions and 31 deletions
Binary file not shown.
+5 -6
View File
@@ -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);
+1 -3
View File
@@ -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)
{
+1 -1
View File
@@ -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;
+3 -20
View File
@@ -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)
{
-1
View File
@@ -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
+2
View File
@@ -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