mirror of
https://github.com/yquake2/xatrix.git
synced 2024-11-10 06:42:22 +00:00
Change edict_s->show_hostile from qboolean to int and add casts
This variable is used as an integer. Defining it as a qbooblean is just wrong. Add some explicit float -> int casts while at it.
This commit is contained in:
parent
1bea78c4ec
commit
77536e07d8
2 changed files with 5 additions and 5 deletions
|
@ -408,7 +408,7 @@ FoundTarget(edict_t *self)
|
|||
level.sight_entity->light_level = 128;
|
||||
}
|
||||
|
||||
self->show_hostile = level.time + 1; /* wake up other monsters */
|
||||
self->show_hostile = (int)level.time + 1; /* wake up other monsters */
|
||||
|
||||
VectorCopy(self->enemy->s.origin, self->monsterinfo.last_sighting);
|
||||
self->monsterinfo.trail_time = level.time;
|
||||
|
@ -579,7 +579,7 @@ FindTarget(edict_t *self)
|
|||
|
||||
if (r == RANGE_NEAR)
|
||||
{
|
||||
if ((client->show_hostile < level.time) && !infront(self, client))
|
||||
if ((client->show_hostile < (int)level.time) && !infront(self, client))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -938,7 +938,7 @@ ai_checkattack(edict_t *self, float dist)
|
|||
}
|
||||
else
|
||||
{
|
||||
self->show_hostile = level.time + 1;
|
||||
self->show_hostile = (int)level.time + 1;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1010,7 +1010,7 @@ ai_checkattack(edict_t *self, float dist)
|
|||
}
|
||||
}
|
||||
|
||||
self->show_hostile = level.time + 1; /* wake up other monsters */
|
||||
self->show_hostile = (int)level.time + 1; /* wake up other monsters */
|
||||
|
||||
/* check knowledge of enemy */
|
||||
enemy_vis = visible(self, self->enemy);
|
||||
|
|
|
@ -1035,7 +1035,7 @@ struct edict_s
|
|||
int max_health;
|
||||
int gib_health;
|
||||
int deadflag;
|
||||
qboolean show_hostile;
|
||||
int show_hostile;
|
||||
|
||||
float powerarmor_time;
|
||||
|
||||
|
|
Loading…
Reference in a new issue