daily pastebin goal
23%
SHARE
TWEET

Untitled

a guest Mar 30th, 2015 1,436 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top