From 65a2f1aaef65dfa423bf816f585e75574404fb09 Mon Sep 17 00:00:00 2001 From: Spoike Date: Mon, 13 Sep 2004 03:12:20 +0000 Subject: [PATCH] I'm working on this slowly. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@196 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/fragstats.c | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/engine/client/fragstats.c b/engine/client/fragstats.c index 9a4506dde..e6e1d48ec 100644 --- a/engine/client/fragstats.c +++ b/engine/client/fragstats.c @@ -74,6 +74,10 @@ typedef struct { static fragstats_t fragstats; +void Stats_Message(char *msg, ...) +{ +} + void Stats_Evaluate(fragfilemsgtypes_t mt, int wid, int p1, int p2) { qboolean u1; @@ -138,14 +142,32 @@ void Stats_Evaluate(fragfilemsgtypes_t mt, int wid, int p1, int p2) case ff_flagtouch: fragstats.clienttotals[p1].grabs++; fragstats.totaltouches++; + + if (u1) + { + Stats_Message("You grabbed the flag\n"); + Stats_Message("flag grabs: %i (%i)\n", fragstats.clienttotals[p1].grabs, fragstats.totaltouches); + } break; case ff_flagcaps: fragstats.clienttotals[p1].caps++; fragstats.totalcaps++; + + if (u1) + { + Stats_Message("You captured the flag\n"); + Stats_Message("flag captures: %i (%i)\n", fragstats.clienttotals[p1].caps, fragstats.totalcaps); + } break; case ff_flagdrops: fragstats.clienttotals[p1].drops++; fragstats.totaldrops++; + + if (u1) + { + Stats_Message("You dropped the flag\n"); + Stats_Message("flag drops: %i (%i)\n", fragstats.clienttotals[p1].drops, fragstats.totaldrops); + } break; //p1 died, p2 killed @@ -153,15 +175,23 @@ void Stats_Evaluate(fragfilemsgtypes_t mt, int wid, int p1, int p2) case ff_fragedby: fragstats.weapontotals[wid].kills++; - if (u1) - fragstats.weapontotals[wid].owndeaths++; fragstats.clienttotals[p1].deaths++; fragstats.totaldeaths++; + if (u1) + { + fragstats.weapontotals[wid].owndeaths++; + Stats_Message("%s killed you\n", cl.players[p2].name); + Stats_Message("%s deaths: %i (%i/%i)\n", fragstats.weapontotals[wid].fullname, fragstats.clienttotals[p2].kills, fragstats.weapontotals[wid].kills); + } - if (u2) - fragstats.weapontotals[wid].ownkills++; fragstats.clienttotals[p2].kills++; fragstats.totalkills++; + if (u2) + { + fragstats.weapontotals[wid].ownkills++; + Stats_Message("You killed %s\n", cl.players[p1].name); + Stats_Message("%s kills: %i (%i/%i)\n", fragstats.weapontotals[wid].fullname, fragstats.clienttotals[p2].kills, fragstats.weapontotals[wid].kills); + } break; case ff_tkills: case ff_tkilledby: