I'm working on this slowly.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@196 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
8bc93c6a3b
commit
65a2f1aaef
1 changed files with 34 additions and 4 deletions
|
@ -74,6 +74,10 @@ typedef struct {
|
||||||
|
|
||||||
static fragstats_t fragstats;
|
static fragstats_t fragstats;
|
||||||
|
|
||||||
|
void Stats_Message(char *msg, ...)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void Stats_Evaluate(fragfilemsgtypes_t mt, int wid, int p1, int p2)
|
void Stats_Evaluate(fragfilemsgtypes_t mt, int wid, int p1, int p2)
|
||||||
{
|
{
|
||||||
qboolean u1;
|
qboolean u1;
|
||||||
|
@ -138,14 +142,32 @@ void Stats_Evaluate(fragfilemsgtypes_t mt, int wid, int p1, int p2)
|
||||||
case ff_flagtouch:
|
case ff_flagtouch:
|
||||||
fragstats.clienttotals[p1].grabs++;
|
fragstats.clienttotals[p1].grabs++;
|
||||||
fragstats.totaltouches++;
|
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;
|
break;
|
||||||
case ff_flagcaps:
|
case ff_flagcaps:
|
||||||
fragstats.clienttotals[p1].caps++;
|
fragstats.clienttotals[p1].caps++;
|
||||||
fragstats.totalcaps++;
|
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;
|
break;
|
||||||
case ff_flagdrops:
|
case ff_flagdrops:
|
||||||
fragstats.clienttotals[p1].drops++;
|
fragstats.clienttotals[p1].drops++;
|
||||||
fragstats.totaldrops++;
|
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;
|
break;
|
||||||
|
|
||||||
//p1 died, p2 killed
|
//p1 died, p2 killed
|
||||||
|
@ -153,15 +175,23 @@ void Stats_Evaluate(fragfilemsgtypes_t mt, int wid, int p1, int p2)
|
||||||
case ff_fragedby:
|
case ff_fragedby:
|
||||||
fragstats.weapontotals[wid].kills++;
|
fragstats.weapontotals[wid].kills++;
|
||||||
|
|
||||||
if (u1)
|
|
||||||
fragstats.weapontotals[wid].owndeaths++;
|
|
||||||
fragstats.clienttotals[p1].deaths++;
|
fragstats.clienttotals[p1].deaths++;
|
||||||
fragstats.totaldeaths++;
|
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.clienttotals[p2].kills++;
|
||||||
fragstats.totalkills++;
|
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;
|
break;
|
||||||
case ff_tkills:
|
case ff_tkills:
|
||||||
case ff_tkilledby:
|
case ff_tkilledby:
|
||||||
|
|
Loading…
Reference in a new issue