#define STATUS_SEND_RESET 1
#define STATUS_SEND_HUNTERS 2
-#define STATUS_SEND_ALL 3
-
-void SurvivalStatuses_Send(int sendflags)
-{
- // If SendFlags is set to non-0 it is networked
- //
- // STATUS_SEND_RESET or BIT(0) or 1 or 0000 0001 -> set all players as survivors
- // STATUS_SEND_HUNTERS or BIT(1) or 2 or 0000 0010 -> reveal hunters to hunters or to all if round has ended
- // STATUS_SEND_ALL or ^both^ or 3 or 0000 0011 -> both of the above
- survivalStatuses.SendFlags = sendflags;
-}
bool SurvivalStatuses_SendEntity(entity this, entity dest, float sendflags)
{
allowed_to_spawn = false;
game_stopped = true;
round_handler_Init(5, autocvar_g_survival_warmup, autocvar_g_survival_round_timelimit);
- SurvivalStatuses_Send(STATUS_SEND_HUNTERS);
+ survivalStatuses.SendFlags = STATUS_SEND_HUNTERS;
return 1;
}
allowed_to_spawn = false;
game_stopped = true;
round_handler_Init(5, autocvar_g_survival_warmup, autocvar_g_survival_round_timelimit);
- SurvivalStatuses_Send(STATUS_SEND_HUNTERS);
+ survivalStatuses.SendFlags = STATUS_SEND_HUNTERS;
FOREACH_CLIENT(true,
{
total_hunters++;
it.survival_status = SURV_STATUS_HUNTER;
});
- SurvivalStatuses_Send(STATUS_SEND_RESET);
+ survivalStatuses.SendFlags = STATUS_SEND_RESET;
FOREACH_CLIENT(IS_PLAYER(it) && !IS_DEAD(it),
{
}
});
bot_relinkplayerlist();
- SurvivalStatuses_Send(STATUS_SEND_RESET);
+ survivalStatuses.SendFlags = STATUS_SEND_RESET;
return true;
}