Server says a player has changed rank!
| 9150 | |
| 9151 | // Server says a player has changed rank! |
| 9152 | void 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! |
| 9179 | void MultiDoStripPlayer(int slot, uint8_t *data) { |
no test coverage detected