Does PXO stuff and sends out messages demoting/promoting the player
| 2983 | |
| 2984 | // Does PXO stuff and sends out messages demoting/promoting the player |
| 2985 | void ChangeRankIndex(int old_index, int pnum) { |
| 2986 | char str[255]; |
| 2987 | int new_index = GetRankIndex(pnum); |
| 2988 | uint8_t goodnews = 1; |
| 2989 | |
| 2990 | if (old_index < new_index) // promoted |
| 2991 | { |
| 2992 | snprintf(str, sizeof(str), "%s %s %s %s!", Players[pnum].callsign, TXT_HAS_BEEN, TXT_PROMOTED, |
| 2993 | TXT(TXT_MULTI_RANKS + new_index)); |
| 2994 | goodnews = 1; |
| 2995 | } else { |
| 2996 | snprintf(str, sizeof(str), "%s %s %s %s!", Players[pnum].callsign, TXT_HAS_BEEN, TXT_DEMOTED, |
| 2997 | TXT(TXT_MULTI_RANKS + new_index)); |
| 2998 | goodnews = 0; |
| 2999 | } |
| 3000 | |
| 3001 | MultiSendChangeRank(pnum, str, goodnews); |
| 3002 | } |
| 3003 | |
| 3004 | // Given a killer and killed player, calculates their new rankings |
| 3005 | void GetNewRankings(object *killed, object *killer) { |
no test coverage detected