MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / MultiDoChangeRank

Function MultiDoChangeRank

Descent3/multi.cpp:9152–9176  ·  view source on GitHub ↗

Server says a player has changed rank!

Source from the content-addressed store, hash-verified

9150
9151// Server says a player has changed rank!
9152void MultiDoChangeRank(uint8_t *data) {
9153 int count = 0;
9154 char str[255];
9155 SKIP_HEADER(data, &count);
9156
9157 int pnum = MultiGetByte(data, &count);
9158 MultiGetString(str, data, &count);
9159 int goodnews = MultiGetByte(data, &count);
9160 float newrank = MultiGetFloat(data, &count);
9161
9162 AddBlinkingHUDMessage(str);
9163
9164 // Play a sound
9165 if (goodnews) {
9166 int soundnum = FindSoundName("CTFScore1");
9167 if (soundnum > 0)
9168 Sound_system.Play2dSound(soundnum);
9169 } else {
9170 int soundnum = FindSoundName("CTFLostFlag1");
9171 if (soundnum > 0)
9172 Sound_system.Play2dSound(soundnum);
9173 }
9174
9175 Players[pnum].rank = newrank;
9176}
9177
9178// Server is telling me to strip bare!
9179void MultiDoStripPlayer(int slot, uint8_t *data) {

Callers 2

MultiProcessDataFunction · 0.85
MultiSendChangeRankFunction · 0.85

Calls 7

SKIP_HEADERFunction · 0.85
MultiGetByteFunction · 0.85
MultiGetStringFunction · 0.85
MultiGetFloatFunction · 0.85
AddBlinkingHUDMessageFunction · 0.85
FindSoundNameFunction · 0.85
Play2dSoundMethod · 0.80

Tested by

no test coverage detected