Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uint32 score = ECMath::Min((ec_uint)ScoreToUpload->CoinTime, (ec_uint)524287); // 19 bits
- uint32 t = SteamUtils()->GetServerRealTime();
- t /= 60;
- t /= 60;
- t /= 24;
- t = ECMath::Max((ec_uint)0, (ec_uint)t - (ec_uint)42 * (ec_uint)365);
- phase = ECMath::clamp(4095-t,0,4095); // 12 bits, since if we set the top bit, steam uses int and not uint, so they become negative scores and the leaderboard sorting wont work
- scorePhase = phase<<19 | score;
- dailyLeaderboard = *l;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement