Advertisement
Guest User

Untitled

a guest
Mar 30th, 2015
1,938
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. uint32 score = ECMath::Min((ec_uint)ScoreToUpload->CoinTime, (ec_uint)524287); // 19 bits
  2. uint32 t = SteamUtils()->GetServerRealTime();
  3. t /= 60;
  4. t /= 60;
  5. t /= 24;
  6. t = ECMath::Max((ec_uint)0, (ec_uint)t - (ec_uint)42 * (ec_uint)365);
  7. 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
  8. scorePhase = phase<<19 | score;
  9. dailyLeaderboard = *l;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement