fix: crash when enabling hitbox aiming between rounds

This commit is contained in:
jeefo 2025-03-20 08:15:26 +03:00
commit 40dc667e03
No known key found for this signature in database
GPG key ID: D696786B81B667C8
3 changed files with 9 additions and 4 deletions

View file

@ -86,7 +86,7 @@ bool BotSupport::isAlive (edict_t *ent) {
if (game.isNullEntity (ent)) {
return false;
}
return ent->v.deadflag == DEAD_NO && ent->v.health > 0 && ent->v.movetype != MOVETYPE_NOCLIP;
return ent->v.deadflag == DEAD_NO && ent->v.health > 0.0f && ent->v.movetype != MOVETYPE_NOCLIP;
}
bool BotSupport::isVisible (const Vector &origin, edict_t *ent) {
@ -382,7 +382,7 @@ void BotSupport::updateClients () {
client.ent = player;
client.flags |= ClientFlags::Used;
if (util.isAlive (player)) {
if (isAlive (player)) {
client.flags |= ClientFlags::Alive;
}
else {