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

Function GetRankLevel

Descent3/multi_server.cpp:2832–2852  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2830#define DEATH_SCALAR (DEATH_BASE / LEVEL_SPAN)
2831
2832int GetRankLevel(int rank) {
2833 if (rank < 600)
2834 return 1;
2835 if (rank < 900)
2836 return 2;
2837 if (rank < 1200)
2838 return 3;
2839 if (rank < 1500)
2840 return 4;
2841 if (rank < 1800)
2842 return 5;
2843 if (rank < 2100)
2844 return 6;
2845 if (rank < 2400)
2846 return 7;
2847 if (rank < 2600)
2848 return 8;
2849 if (rank < 3000)
2850 return 9;
2851 return 10;
2852}
2853
2854// Given two objects, calculates rank for them after a kill
2855float CalculateNewRanking(object *obj_a, object *obj_b, int won) {

Callers 1

CalculateNewRankingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected