MCPcopy Create free account
hub / github.com/demoth/jake2 / SV_BroadcastPrintf

Method SV_BroadcastPrintf

server/src/main/java/jake2/server/SV_MAIN.java:581–595  ·  view source on GitHub ↗

Sends text to all active clients

(int level, String message, String gameName)

Source from the content-addressed store, hash-verified

579 * Sends text to all active clients
580 */
581 public void SV_BroadcastPrintf(int level, String message, String gameName) {
582
583 // echo to console
584 if (Globals.dedicated.value != 0) {
585 Com.Printf(message);
586 }
587
588 for (client_t cl: getClientsForInstance(gameName)) {
589 if (cl == null || level < cl.messagelevel)
590 continue;
591 if (cl.state != ClientStates.CS_SPAWNED)
592 continue;
593 cl.netchan.reliablePending.add(new PrintMessage(level, message));
594 }
595 }
596
597 /**
598 * SV_RateDrop

Callers 2

SV_SendClientMessagesMethod · 0.95
SV_CheckTimeoutsMethod · 0.95

Calls 3

PrintfMethod · 0.95
getClientsForInstanceMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected