Skip to content
Snippets Groups Projects
Commit da541a86 authored by mcmlxxix's avatar mcmlxxix
Browse files

create scores for users that dont yet have them when eliminating or being eliminated

parent 4a9455cf
Branches
Tags
No related merge requests found
......@@ -183,6 +183,14 @@ function Map(c,r,p,gn)
if(killer.user>0) {
games.loadRankings();
if(!scores[killer.user]) {
scores[killer.user] = {
'score':0,
'kills':0,
'wins':0,
'losses':0
}
}
if(this.singlePlayer)
scores[killer.user].score+=settings.killPointsSolo;
else
......@@ -195,6 +203,14 @@ function Map(c,r,p,gn)
games.loadRankings();
updaterankings=true;
}
if(!scores[dead.user]) {
scores[dead.user] = {
'score':0,
'kills':0,
'wins':0,
'losses':0
}
}
scores[dead.user].losses+=1;
if(this.singlePlayer) {
this.status=0;
......@@ -355,7 +371,6 @@ function Map(c,r,p,gn)
var checked=[];
var counted=[];
var tocheck=[];
var y=10;
for(tttt in terr) {
var count=1;
tocheck.push(terr[tttt]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment