]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/player.qc
Merge branch 'Lyberta/PlayerDied' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / player.qc
index 091b97862913b1dbc95f65ed98bad5607eb88e7b..f22ff0daf8f5d1617fcda9cb121e96466c475857 100644 (file)
@@ -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);
        }
 }
 
@@ -692,6 +693,40 @@ void DebugPrintToChat(entity player, string 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: