Playtime stats between players only; no ping; page-wide grid
K/D, headshot %, kills and deaths (drawer, Top players, staff session lists) now come from pt_events, so kills of bots and deaths to bots don't count, as in Records; damage per round and MVPs are gone, since only the game's counters have them and those include bots. Average ping and the record count footnote are no longer shown. The server header's grid now runs behind the whole page.
This commit is contained in:
parent
c7fbff0e43
commit
2516759fa9
6 changed files with 120 additions and 81 deletions
|
|
@ -338,15 +338,15 @@ function ptDrawer(pt, online) {
|
|||
<h3>Last 30 days</h3>
|
||||
<div class="pt-spark" role="img" aria-label="Hours played each day">${p.days.map((d) => `<i class="${d.hours ? "" : "zero"}" style="height:${d.hours ? Math.max(6, (d.hours / maxDay) * 100) : 4}%" data-tip="${esc(`${ptDay(d.date)} · ${d.hours ? ptH(d.hours) : "didn't play"}`)}"></i>`).join("")}</div>
|
||||
</section>
|
||||
${st.kills + st.deaths > 0 ? `<section>
|
||||
${st && st.kills + st.deaths > 0 ? `<section>
|
||||
<h3>Stats</h3>
|
||||
<div class="pt-stats">
|
||||
<div><b>${ptKD(st.kills, st.deaths)}</b><small>K/D</small></div>
|
||||
<div><b>${ptPct(st.headshots, st.kills)}%</b><small>Headshot kills</small></div>
|
||||
<div><b>${st.rounds ? Math.round(st.damage / st.rounds) : "–"}</b><small>Damage per round</small></div>
|
||||
<div><b>${st.mvps}</b><small>MVPs</small></div>
|
||||
<div><b>${st.kills.toLocaleString()}</b><small>Kills</small></div>
|
||||
<div><b>${st.deaths.toLocaleString()}</b><small>Deaths</small></div>
|
||||
</div>
|
||||
<p class="muted" style="margin:10px 0 0;font-size:14px">${st.kills.toLocaleString()} kills, ${st.deaths.toLocaleString()} deaths and ${st.assists.toLocaleString()} assists over ${st.rounds.toLocaleString()} rounds.</p>
|
||||
<p class="muted" style="margin:10px 0 0;font-size:14px">Against other players only: bots don't count.</p>
|
||||
</section>` : ""}
|
||||
${p.events && Object.values(p.events).some((n) => n > 0) ? `<section>
|
||||
<h3>Records</h3>
|
||||
|
|
@ -356,7 +356,6 @@ function ptDrawer(pt, online) {
|
|||
<div><b>${p.events.knifeKills.toLocaleString()}</b><small>Knife kills</small></div>
|
||||
<div><b>${p.events.zeusKills.toLocaleString()}</b><small>Zeus kills</small></div>
|
||||
</div>
|
||||
<p class="muted" style="margin:10px 0 0;font-size:14px">${p.events.headshots.toLocaleString()} headshot kills. Counted as they happen, not in warmup or on bots.</p>
|
||||
</section>` : ""}
|
||||
${p.maps.length ? `<section>
|
||||
<h3>Favourite maps</h3>
|
||||
|
|
@ -381,17 +380,14 @@ function ptDrawer(pt, online) {
|
|||
<h3>Recent sessions</h3>
|
||||
<ul class="pt-sessions">${s.recent.map((x) => `<li>
|
||||
<div class="top"><b>${fmtDate(x.started)}</b><span>${ptDur(x.seconds)}</span></div>
|
||||
<div class="muted">${esc(x.map)}${x.endMap && x.endMap !== x.map ? ` → ${esc(x.endMap)}` : ""}${x.kills != null ? ` · ${x.kills}–${x.deaths}` : ""}${x.ping != null ? ` · ${x.ping} ms` : ""}</div>
|
||||
<div class="muted">${esc(x.map)}${x.endMap && x.endMap !== x.map ? ` → ${esc(x.endMap)}` : ""}${x.kills != null ? ` · ${x.kills}–${x.deaths}` : ""}</div>
|
||||
<div>${reason(x)}</div>
|
||||
</li>`).join("")}</ul>
|
||||
</section>` : ""}
|
||||
${s.country || s.ping != null ? `<section>
|
||||
<h3>Connection</h3>
|
||||
<dl class="kv">
|
||||
${s.country ? `<dt>Location</dt><dd>${s.city ? `${esc(s.city)}, ` : ""}${esc(s.countryName || s.country)}</dd>` : ""}
|
||||
${s.ping != null ? `<dt>Average ping</dt><dd>${s.ping} ms <span class="muted">last 30 days</span></dd>` : ""}
|
||||
</dl>
|
||||
</section>${s.country ? PT_DBIP : ""}` : ""}`;
|
||||
${s.country ? `<section>
|
||||
<h3>Location</h3>
|
||||
<p style="margin:0">${s.city ? `${esc(s.city)}, ` : ""}${esc(s.countryName || s.country)}</p>
|
||||
</section>${PT_DBIP}` : ""}`;
|
||||
}
|
||||
|
||||
/* ---------- Events ---------- */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue