Skip to content

Commit 78da22f

Browse files
authored
Merge pull request #180 from tcsabina/Issue_170
Added LG stats to end game report (Issue ##170)
2 parents fb40f60 + 94422ea commit 78da22f

File tree

1 file changed

+64
-7
lines changed

1 file changed

+64
-7
lines changed

src/stats.c

Lines changed: 64 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,11 @@ static void SummaryTPStats(void)
220220
redtext("Dropped"), tmStats[i].wpn[wpRL].drops, redtext("Xfer"),
221221
tmStats[i].transferred_packs);
222222

223+
// lg
224+
G_bprint(2, "%s: %s:%d %s:%d %s:%d\n", redtext(" LG"), redtext("Took"),
225+
tmStats[i].wpn[wpLG].tooks, redtext("Killed"), tmStats[i].wpn[wpLG].ekills,
226+
redtext("Dropped"), tmStats[i].wpn[wpLG].drops);
227+
223228
// damage
224229
if (deathmatch == 1)
225230
{
@@ -613,13 +618,46 @@ int maxspree, maxspree_q, maxdmgg, maxdmgtd, maxrlkills;
613618

614619
void OnePlayerStats(gedict_t *p, int tp)
615620
{
616-
float dmg_g, dmg_t, dmg_team, dmg_self, dmg_eweapon, dmg_g_rl, dmg_td;
617-
int ra, ya, ga;
618-
int mh, d_rl, k_rl, t_rl;
619-
int quad, pent, ring;
620-
float ph_rl, vh_rl, h_rl, a_rl, ph_gl, vh_gl, a_gl, h_lg, a_lg, h_sg, a_sg, h_ssg, a_ssg;
621-
float e_sg, e_ssg, e_lg;
622-
int res, str, hst, rgn;
621+
float dmg_g;
622+
float dmg_t;
623+
float dmg_team;
624+
float dmg_self;
625+
float dmg_eweapon;
626+
float dmg_g_rl;
627+
float dmg_td;
628+
int ra;
629+
int ya;
630+
int ga;
631+
int mh;
632+
int d_rl;
633+
int k_rl;
634+
int t_rl;
635+
int d_lg;
636+
int k_lg;
637+
int t_lg;
638+
int quad;
639+
int pent;
640+
int ring;
641+
float ph_rl;
642+
float vh_rl;
643+
float h_rl;
644+
float a_rl;
645+
float ph_gl;
646+
float vh_gl;
647+
float a_gl;
648+
float h_lg;
649+
float a_lg;
650+
float h_sg;
651+
float a_sg;
652+
float h_ssg;
653+
float a_ssg;
654+
float e_sg;
655+
float e_ssg;
656+
float e_lg;
657+
int res;
658+
int str;
659+
int hst;
660+
int rgn;
623661

624662
dmg_g = p->ps.dmg_g;
625663
dmg_g_rl = p->ps.dmg_g_rl;
@@ -658,6 +696,10 @@ void OnePlayerStats(gedict_t *p, int tp)
658696
k_rl = p->ps.wpn[wpRL].ekills;
659697
t_rl = p->ps.wpn[wpRL].tooks;
660698

699+
d_lg = p->ps.wpn[wpLG].drops;
700+
k_lg = p->ps.wpn[wpLG].ekills;
701+
t_lg = p->ps.wpn[wpLG].tooks;
702+
661703
if (isCTF() && ((g_globalvars.time - match_start_time) > 0))
662704
{
663705
res = (p->ps.res_time / (g_globalvars.time - match_start_time)) * 100;
@@ -758,6 +800,21 @@ void OnePlayerStats(gedict_t *p, int tp)
758800
va(" %s:%d", redtext("Xfer"), p->ps.transferred_packs) : ""));
759801
}
760802

803+
// lg
804+
if (isTeam())
805+
{
806+
G_bprint(
807+
2,
808+
"%s: %s:%d %s:%d %s:%d\n",
809+
redtext(" LG"),
810+
redtext("Took"),
811+
t_lg,
812+
redtext("Killed"),
813+
k_lg,
814+
redtext("Dropped"),
815+
d_lg);
816+
}
817+
761818
// damage
762819
if (isTeam() && (deathmatch == 1))
763820
{

0 commit comments

Comments
 (0)