mirror of
https://github.com/yquake2/xatrix.git
synced 2024-11-10 06:42:22 +00:00
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 yquake2 issue #162.
This commit is contained in:
parent
20cdbfe1c0
commit
1bea78c4ec
3 changed files with 3 additions and 3 deletions
|
@ -915,7 +915,7 @@ ai_checkattack(edict_t *self, float dist)
|
|||
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -1071,7 +1071,7 @@ struct edict_s
|
|||
float delay; /* before firing targets */
|
||||
float random;
|
||||
|
||||
float teleport_time;
|
||||
float last_sound_time;
|
||||
|
||||
int watertype;
|
||||
int waterlevel;
|
||||
|
|
|
@ -124,7 +124,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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue