Only set the infoclient if it's a teammate player that can be sent to other clients

This commit is contained in:
smallmodel 2024-11-29 23:45:52 +01:00
parent f31ea39331
commit 0fb775cd60
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -7285,7 +7285,7 @@ void Player::UpdateStats(void)
trace = G_Trace(m_vViewPos, vec_zero, vec_zero, vEnd, this, MASK_BEAM, qfalse, "infoclientcheck");
if (trace.ent && trace.ent->entity->IsSubclassOfPlayer()) {
if (trace.ent && trace.ent->entity->IsSubclassOfPlayer() && !(trace.ent->r.svFlags & SVF_NOCLIENT)) {
Player *p = static_cast<Player *>(trace.ent->entity);
if (IsSpectator() || p->GetTeam() == GetTeam()) {