string message = strcat("RemovePlayerFromTeam: ",
player.netname, " has invalid role.");
LOG_TRACE(message);
- FOREACH_CLIENT(IS_REAL_CLIENT(it),
- {
- PrintToChat(it, message);
- });
+ DebugPrintToChatAll(message);
}
return;
}
string message = strcat("RemovePlayerFromTeam: ",
player.netname, " has invalid role.");
LOG_TRACE(message);
- FOREACH_CLIENT(IS_REAL_CLIENT(it),
- {
- PrintToChat(it, message);
- });
+ DebugPrintToChatAll(message);
return;
}
Surv_SetPlayerRole(player, SURVIVAL_ROLE_NONE);
string message = strcat("Survival: Added alive attacker, total = ",
ftos(surv_numattackersalive));
LOG_TRACE(message);
- FOREACH_CLIENT(IS_REAL_CLIENT(it),
- {
- PrintToChat(it, message);
- });
+ DebugPrintToChatAll(message);
}
break;
}
string message = strcat("Survival: Added alive defender, total = ",
ftos(surv_numdefendersalive));
LOG_TRACE(message);
- FOREACH_CLIENT(IS_REAL_CLIENT(it),
- {
- PrintToChat(it, message);
- });
+ DebugPrintToChatAll(message);
break;
}
}
string message = strcat("Survival: Removed alive attacker, total = ",
ftos(surv_numattackersalive));
LOG_TRACE(message);
- FOREACH_CLIENT(IS_REAL_CLIENT(it),
- {
- PrintToChat(it, message);
- });
+ DebugPrintToChatAll(message);
}
break;
}
string message = strcat("Survival: Removed alive defender, total = ",
ftos(surv_numdefendersalive));
LOG_TRACE(message);
- FOREACH_CLIENT(IS_REAL_CLIENT(it),
- {
- PrintToChat(it, message);
- });
+ DebugPrintToChatAll(message);
switch (surv_numdefendersalive)
{
case 1:
string message = strcat("SwapTeams: ", it.netname,
" has invalid role.");
LOG_TRACE(message);
- FOREACH_CLIENT(IS_REAL_CLIENT(it),
- {
- PrintToChat(it, message);
- });
+ DebugPrintToChatAll(message);
}
break;
}
string message = strcat("SwapTeams: ", it.netname,
" has invalid role.");
LOG_TRACE(message);
- FOREACH_CLIENT(IS_REAL_CLIENT(it),
- {
- PrintToChat(it, message);
- });
+ DebugPrintToChatAll(message);
break;
}
}
string message = strcat("Survival: Player_ChangedTeam, ", player.netname,
", old team = ", ftos(oldteam), " new team = ", ftos(newteam));
LOG_TRACE(message);
- FOREACH_CLIENT(IS_REAL_CLIENT(it),
- {
- PrintToChat(it, message);
- });
+ DebugPrintToChatAll(message);
if ((oldteam != -1) && IS_PLAYER(player) && !IS_DEAD(player))
{
Surv_RemovePlayerFromAliveList(player, oldteam);
MUTATOR_HOOKFUNCTION(surv, MakePlayerObserver)
{
- //FOREACH_CLIENT(IS_REAL_CLIENT(it), { PrintToChat(it, "MakePlayerObserver"); });
+ //DebugPrintToChatAll("MakePlayerObserver");
entity player = M_ARGV(0, entity);
LOG_TRACE("SURVIVAL: MakePlayerObserver, player = ", player.netname);
if (player.killindicator_teamchange == -2) // player wants to spectate
MUTATOR_HOOKFUNCTION(surv, reset_map_global)
{
LOG_TRACE("SURVIVAL: reset_map_global");
- //FOREACH_CLIENT(true, { centerprint(it, "reset_map_global"); });
+ //DebugPrintToChatAll("reset_map_global");
surv_allowed_to_spawn = true;
surv_numattackersalive = 0;
surv_numdefendersalive = 0;
MUTATOR_HOOKFUNCTION(surv, reset_map_players)
{
LOG_TRACE("SURVIVAL: reset_map_players");
- //FOREACH_CLIENT(true, { centerprint(it, "reset_map_players"); });
+ //DebugPrintToChatAll("reset_map_players");
Surv_SwapTeams();
FOREACH_CLIENT(true,
{
entity player = M_ARGV(0, entity);
string message = strcat("Survival: PlayerSpawn, player = ", player.netname);
LOG_TRACE(message);
- FOREACH_CLIENT(IS_REAL_CLIENT(it), { PrintToChat(it, message); });
+ DebugPrintToChatAll(message);
player.surv_state = SURVIVAL_STATE_PLAYING;
//Surv_CountAlivePlayers();
Surv_AddPlayerToAliveList(player, player.team);
return MUT_ITEMTOUCH_RETURN;
}
}
- PrintToChat(player, item.classname);
+ DebugPrintToChat(player, item.classname);
return MUT_ITEMTOUCH_RETURN;
}
}
/// \brief Hook which is called when the player dies.
MUTATOR_HOOKFUNCTION(surv, PlayerDies)
{
- //FOREACH_CLIENT(IS_REAL_CLIENT(it), { PrintToChat(it, "PlayerDies"); });
+ //DebugPrintToChatAll("PlayerDies");
entity frag_target = M_ARGV(2, entity);
if (!Surv_CanPlayerSpawn(frag_target))
{
/// \brief Hook which is called after the player died.
MUTATOR_HOOKFUNCTION(surv, PlayerDied)
{
- //FOREACH_CLIENT(IS_REAL_CLIENT(it), { PrintToChat(it, "PlayerDied"); });
+ //DebugPrintToChatAll("PlayerDied");
entity player = M_ARGV(0, entity);
Surv_RemovePlayerFromAliveList(player, player.team);
//Surv_CountAlivePlayers();