Commit 90d6ce38 authored by IamIpanda's avatar IamIpanda

score respect name vpass

parent 3ce8db15
......@@ -1417,8 +1417,9 @@ class Room
return if @deleted
#log.info 'room-delete', this.name, ROOM_all.length
score_array=[]
for name, score of @scores
score_form = { name: name.split('$')[0], score: score, deck: null, name_vpass: name }
for name_vpass, score of @scores
name = name_vpass.split('$')[0]
score_form = { name: name, score: score, deck: null, name_vpass: name_vpass }
if @decks[name]
score_form.deck = @decks[name]
score_array.push score_form
......
......@@ -1847,20 +1847,21 @@
}
delete() {
var end_time, formatted_replays, index, j, len, log_rep_id, name, player_datas, recorder_buffer, ref, ref1, repbuf, replay_id, room_name, score, score_array, score_form;
var end_time, formatted_replays, index, j, len, log_rep_id, name, name_vpass, player_datas, recorder_buffer, ref, ref1, repbuf, replay_id, room_name, score, score_array, score_form;
if (this.deleted) {
return;
}
//log.info 'room-delete', this.name, ROOM_all.length
score_array = [];
ref = this.scores;
for (name in ref) {
score = ref[name];
for (name_vpass in ref) {
score = ref[name_vpass];
name = name_vpass.split('$')[0];
score_form = {
name: name.split('$')[0],
name: name,
score: score,
deck: null,
name_vpass: name
name_vpass: name_vpass
};
if (this.decks[name]) {
score_form.deck = this.decks[name];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment