Rename teleport_time to last_sound time

teleport_time has nothing to do with teleports, it's just the time
since the last player sound. Rename it accordingly. This was suggest
by maraakate in issue #162.
This commit is contained in:
Yamagi Burmeister 2016-12-18 09:07:51 +01:00
parent 935c37f819
commit c26f85fd02
3 changed files with 3 additions and 3 deletions

View file

@ -952,7 +952,7 @@ ai_checkattack(edict_t *self)
if (!visible(self, self->goalentity) && (self->monsterinfo.aiflags & AI_SOUND_TARGET))
{
if ((level.time - self->enemy->teleport_time) > 5.0)
if ((level.time - self->enemy->last_sound_time) > 5.0)
{
if (self->goalentity == self->enemy)
{

View file

@ -1053,7 +1053,7 @@ struct edict_s
float delay; /* before firing targets */
float random;
float teleport_time;
float last_sound_time;
int watertype;
int waterlevel;

View file

@ -137,7 +137,7 @@ PlayerNoise(edict_t *who, vec3_t where, int type)
VectorCopy(where, noise->s.origin);
VectorSubtract(where, noise->maxs, noise->absmin);
VectorAdd(where, noise->maxs, noise->absmax);
noise->teleport_time = level.time;
noise->last_sound_time = level.time;
gi.linkentity(noise);
}