1 #include "elimination.qh"
3 #include <common/net_linked.qh>
4 #include <server/utils.qh>
6 .float(entity) isEliminated;
7 bool EliminatedPlayers_SendEntity(entity this, entity to, float sendflags)
9 Stream out = MSG_ENTITY;
10 WriteHeader(out, ENT_CLIENT_ELIMINATEDPLAYERS);
11 serialize(byte, out, sendflags);
13 for (int i = 1; i <= maxclients; i += 8) {
15 entity e = edict_num(i);
16 for (int b = 0; b < 8; ++b, e = nextent(e)) {
17 if (eliminatedPlayers.isEliminated(e)) {
21 serialize(byte, out, f);
27 void EliminatedPlayers_Init(float(entity) isEliminated_func)
31 backtrace("Can't spawn eliminatedPlayers again!");
34 Net_LinkEntity(eliminatedPlayers = new_pure(eliminatedPlayers), false, 0, EliminatedPlayers_SendEntity);
35 eliminatedPlayers.isEliminated = isEliminated_func;