X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fplayer.qc;h=faa3c810137a4628ae82b585d43cdcbd1def147c;hp=8598bc095e76871416d0b535c7667185e09ad080;hb=63ab06764e6e0a20481ab406863eb7bca32cb669;hpb=63de1215428d078d5fb2021c49edf59a7900cef9 diff --git a/qcsrc/server/player.qc b/qcsrc/server/player.qc index 8598bc095e..faa3c81013 100644 --- a/qcsrc/server/player.qc +++ b/qcsrc/server/player.qc @@ -658,6 +658,7 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, ATTACK_FINISHED_FOR(this, it.m_id, slot) = 0; } )); + MUTATOR_CALLHOOK(PlayerDied, this); } } @@ -684,6 +685,48 @@ void PrintToChat(entity player, string text) sprint(player, text); } +void DebugPrintToChat(entity player, string text) +{ + if (autocvar_developer) + { + PrintToChat(player, text); + } +} + +void PrintToChatAll(string text) +{ + text = strcat("\{1}^7", text, "\n"); + bprint(text); +} + +void DebugPrintToChatAll(string text) +{ + if (autocvar_developer) + { + PrintToChatAll(text); + } +} + +void PrintToChatTeam(int teamnum, string text) +{ + text = strcat("\{1}^7", text, "\n"); + FOREACH_CLIENT(IS_REAL_CLIENT(it), + { + if (it.team == teamnum) + { + sprint(it, text); + } + }); +} + +void DebugPrintToChatTeam(int teamnum, string text) +{ + if (autocvar_developer) + { + PrintToChatTeam(teamnum, text); + } +} + /** * message "": do not say, just test flood control * return value: