Fiddled and added notes to put_scores()
This commit is contained in:
parent
db01e17fd7
commit
4520ba5a65
20
score.c
20
score.c
@ -371,13 +371,27 @@ put_scores(const object *monster, short other)
|
||||
}
|
||||
}
|
||||
|
||||
/* Gold&Glory
|
||||
* At the end of a game, the rogueist's gold and experience scores can be in
|
||||
* one of the following conditions with respect to the top scores:
|
||||
* 1. The rogueist is not in the top scorer list
|
||||
* --> Add rogueist to top score list if score is high enough
|
||||
* 2. The rogueist is in the top score list, but his current score is not greater
|
||||
* than his previous top score
|
||||
* --> Do nothing
|
||||
* 3. The rogueist is in the top score list, and his current score is greater
|
||||
* than his previous top score
|
||||
* --> Remove rogueist from top score list; readd rogueist at new rank
|
||||
* (condition of gold and experience scores are independent)
|
||||
*/
|
||||
|
||||
/* Search the gold score list. */
|
||||
for (i = 0; i < FIRST_EXP_SCORE; i++) {
|
||||
if (!strcmp(scores[i].username, login_name)) {
|
||||
/* found our score */
|
||||
if (rogue.gold < scores[i].gold) {
|
||||
/* we didn't do as well as last time */
|
||||
/* score_only = 1;*/
|
||||
score_only = 1;
|
||||
} else {
|
||||
/* we did better; mark entry for removal */
|
||||
found_player = i;
|
||||
@ -392,7 +406,7 @@ put_scores(const object *monster, short other)
|
||||
/* found our score */
|
||||
if (rogue.exp_points < scores[i].gold) {
|
||||
/* we didn't do as well as last time */
|
||||
/* score_only = 1;*/
|
||||
score_only = 1;
|
||||
} else {
|
||||
/* we did better; mark entry for removal */
|
||||
found_player_exp = i;
|
||||
@ -401,7 +415,7 @@ put_scores(const object *monster, short other)
|
||||
}
|
||||
}
|
||||
|
||||
if (found_player == -1 && found_player_exp == -1) score_only = 1;
|
||||
/* if (found_player == -1 && found_player_exp == -1) score_only = 1;*/
|
||||
|
||||
/* Remove superseded entries, if any. */
|
||||
if (found_player != -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user