MCPcopy Create free account
hub / github.com/assaultcube/AC / sendvoicecomteam

Function sendvoicecomteam

source/src/server.cpp:1778–1791  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1776}
1777
1778void sendvoicecomteam(int sound, int sender)
1779{
1780 if(!valid_client(sender) || clients[sender]->team == TEAM_NUM) return;
1781 packetbuf p(MAXTRANS, ENET_PACKET_FLAG_RELIABLE);
1782 putint(p, SV_VOICECOMTEAM);
1783 putint(p, sender);
1784 putint(p, sound);
1785 ENetPacket *packet = p.finalize();
1786 loopv(clients) if(i!=sender)
1787 {
1788 if(clients[i]->team == clients[sender]->team || !m_teammode)
1789 sendpacket(i, 1, packet);
1790 }
1791}
1792
1793int numplayers()
1794{

Callers 1

processFunction · 0.85

Calls 5

valid_clientFunction · 0.85
putintFunction · 0.85
sendpacketFunction · 0.85
finalizeMethod · 0.80
loopvFunction · 0.70

Tested by

no test coverage detected