MCPcopy Create free account
hub / github.com/ddnet/ddnet / SetVariant

Method SetVariant

src/game/server/scoreworker.cpp:24–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24void CScorePlayerResult::SetVariant(Variant v)
25{
26 m_MessageKind = v;
27 switch(v)
28 {
29 case DIRECT:
30 case ALL:
31 for(auto &aMessage : m_Data.m_aaMessages)
32 aMessage[0] = 0;
33 break;
34 case BROADCAST:
35 m_Data.m_aBroadcast[0] = 0;
36 break;
37 case MAP_VOTE:
38 m_Data.m_MapVote.m_aMap[0] = '\0';
39 m_Data.m_MapVote.m_aReason[0] = '\0';
40 m_Data.m_MapVote.m_aServer[0] = '\0';
41 break;
42 case PLAYER_INFO:
43 m_Data.m_Info.m_Birthday = 0;
44 m_Data.m_Info.m_Time.reset();
45 for(float &TimeCp : m_Data.m_Info.m_aTimeCp)
46 TimeCp = 0;
47 break;
48 case PLAYER_TIMECP:
49 m_Data.m_Info.m_aRequestedPlayer[0] = '\0';
50 m_Data.m_Info.m_Time.reset();
51 for(float &TimeCp : m_Data.m_Info.m_aTimeCp)
52 TimeCp = 0;
53 break;
54 }
55}
56
57CTeamrank::CTeamrank() :
58 m_NumNames(0)

Callers 3

LoadPlayerDataMethod · 0.80
LoadPlayerTimeCpMethod · 0.80
MapVoteMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected