mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-05-16 22:24:07 +00:00
fixes to daily leaderboards
This commit is contained in:
parent
319190b0dd
commit
9fb73c79bb
@ -557,10 +557,15 @@ void improveItemScores() {
|
|||||||
improve_score(77, itSwitch);
|
improve_score(77, itSwitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int next_stat_tick;
|
||||||
|
|
||||||
void achievement_final(bool really_final) {
|
void achievement_final(bool really_final) {
|
||||||
if(offlineMode) return;
|
if(offlineMode) return;
|
||||||
#ifdef HAVE_ACHIEVEMENTS
|
#ifdef HAVE_ACHIEVEMENTS
|
||||||
|
if(ticks > next_stat_tick) {
|
||||||
upload_score(LB_STATISTICS, time(NULL));
|
upload_score(LB_STATISTICS, time(NULL));
|
||||||
|
next_stat_tick = ticks + 600000;
|
||||||
|
}
|
||||||
if(cheater) return;
|
if(cheater) return;
|
||||||
#if CAP_TOUR
|
#if CAP_TOUR
|
||||||
if(tour::on) return;
|
if(tour::on) return;
|
||||||
@ -584,9 +589,9 @@ void achievement_final(bool really_final) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CAP_DAILY
|
#if CAP_DAILY
|
||||||
if(daily::on) {
|
if(daily::on) {
|
||||||
upload_score(daily::find_daily_lbid(daily::daily_id), gold(NO_LOVE));
|
daily::uploadscore(really_final);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
3
game.cpp
3
game.cpp
@ -3286,6 +3286,9 @@ void gainItem(eItem it) {
|
|||||||
items[it]++; if(it != itLotus) updateHi(it, items[it]);
|
items[it]++; if(it != itLotus) updateHi(it, items[it]);
|
||||||
achievement_collection(it, gold(), g);
|
achievement_collection(it, gold(), g);
|
||||||
multi::treasures[multi::cpid]++;
|
multi::treasures[multi::cpid]++;
|
||||||
|
#if CAP_DAILY
|
||||||
|
if(daily::on) achievement_final(false);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
string itemcounter(int qty) {
|
string itemcounter(int qty) {
|
||||||
|
2
hyper.h
2
hyper.h
@ -3294,6 +3294,8 @@ namespace daily {
|
|||||||
void showMenu();
|
void showMenu();
|
||||||
int find_daily_lbid(int id);
|
int find_daily_lbid(int id);
|
||||||
bool prevent_spawn_treasure_on(cell *c);
|
bool prevent_spawn_treasure_on(cell *c);
|
||||||
|
void handleQuit(int sev);
|
||||||
|
void uploadscore(bool really_final);
|
||||||
}
|
}
|
||||||
|
|
||||||
enum eOrbLandRelation {
|
enum eOrbLandRelation {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user