#ifdef SVQC
- int ENTCS_PUBLICMASK = 0;
+ int ENTCS_PUBLICMASK = 0, ENTCS_PRIVATEMASK = 0;
STATIC_INIT(ENTCS_PUBLICMASK)
{
- FOREACH(EntCSProps, it.m_public,
+ FOREACH(EntCSProps, true,
{
- ENTCS_PUBLICMASK |= BIT(it.m_id);
+ if (it.m_public)
+ ENTCS_PUBLICMASK |= BIT(it.m_id);
+ else
+ ENTCS_PRIVATEMASK |= BIT(it.m_id);
+ });
+ }
+
+ void entcs_update_players(entity player)
+ {
+ FOREACH_CLIENT(it != player && IS_PLAYER(it),
+ {
+ CS(it).entcs.SendFlags |= ENTCS_PRIVATEMASK;
});
}
.bool m_entcs_private;
/** True when origin is available */
-// FIXME: it seems sometimes this is false when observing even though observers should be able to know about all players
-// easily reproducible on heart_v2 or The_Yard with bots - might be because they lack waypoints and bots stand still
-// it has happened in matches with players and no bots but much more rarely
.bool has_origin;
/** True when a recent server sent origin has been received */
void entcs_force_origin(entity player);
+ void entcs_update_players(entity player);
+
bool radar_showenemies;
#endif
if (IS_PLAYER(player) && !IS_DEAD(player))
ca_LastPlayerForTeam_Notify(player);
if (player.killindicator_teamchange == -2) // player wants to spectate
+ {
+ entcs_update_players(player);
player.caplayer = 0;
+ }
if (player.caplayer)
player.frags = FRAGS_PLAYER_OUT_OF_GAME;
if (!warmup_stage)
}
make_impure(NEW(DamageText, server_entity_index, entcs.origin, false, health, armor, potential_damage, deathtype, friendlyfire));
} else if (autocvar_cl_damagetext_2d && spectatee_status != -1) {
- // never show 2d damagetext when observing - might be a bug in .has_origin
-
// screen coords only
vector screen_pos = vec2(vid_conwidth * autocvar_cl_damagetext_2d_pos.x, vid_conheight * autocvar_cl_damagetext_2d_pos.y);
IL_EACH(g_drawables_2d, it.instanceOfDamageText && it.m_screen_coords && it.m_group == server_entity_index, {
if (vote_called) { VoteCount(false); }
ReadyCount();
}
+ entcs_update_players(this);
}
entity spot = SelectSpawnPoint(this, true);