summaryrefslogtreecommitdiff
path: root/src/game/g_cmds.c
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2019-02-11 19:18:17 +0100
committerPaweł Redman <pawel.redman@gmail.com>2019-02-11 19:18:17 +0100
commit39a787b1ce947e04ed6011d0dc555cfb2ba8f8f1 (patch)
tree4cfea0f1b5f9e44715e79db62c944bde42daf72f /src/game/g_cmds.c
parentc2f8ef14e564125d141c4341a4a1863bacb21be9 (diff)
Log kill rewards and donations in detail.
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r--src/game/g_cmds.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index eac9ac4..01dcdc2 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -5418,22 +5418,41 @@ static void Cmd_Ignore_f( gentity_t *ent )
}
}
}
+
+ if( ent->client->pers.teamSelection == PTE_ALIENS )
+ G_LogPrintf( "Donate: %d %f: %s^7 donated %.3f evo(s)\n", ent - g_entities,
+ total-value, ent->client->pers.netname, total-value);
+ else
+ G_LogPrintf( "Donate: %d %f: %s^7 donated %.0f credit(s)\n", ent - g_entities,
+ total-value, ent->client->pers.netname, total-value);
// transfer funds
G_AddFundsToClient( ent->client, value - total, qtrue );
for( i = 0; i < level.maxclients; i++ )
if( amounts[ i ] ) {
- if( ent->client->pers.teamSelection == PTE_ALIENS)
+ if( ent->client->pers.teamSelection == PTE_ALIENS )
+ {
+ if( g_logFunds.integer )
+ G_LogPrintf( "DonateRecv: %d %d %f: %s^7 received %.3f evo(s)\n",
+ ent - g_entities, i, g_clients[ i ].pers.netname, amounts[ i ] );
+
trap_SendServerCommand( i,
va( "print \"%s^7 donated %.3f %s to you, don't forget to say 'thank you'!\n\"",
ent->client->pers.netname, amounts[ i ], type ) );
+ }
else
- trap_SendServerCommand( i,
+ {
+ if( g_logFunds.integer )
+ G_LogPrintf( "DonateRecv: %d %d %f: %s^7 received %.0f credit(s)\n",
+ ent - g_entities, i, g_clients[ i ].pers.netname, amounts[ i ] );
+
+ trap_SendServerCommand( i,
va( "print \"%s^7 donated %.0f %s to you, don't forget to say 'thank you'!\n\"",
ent->client->pers.netname, amounts[ i ], type ) );
+ }
}
- if( ent->client->pers.teamSelection == PTE_ALIENS)
+ if( ent->client->pers.teamSelection == PTE_ALIENS )
trap_SendServerCommand( ent-g_entities,
va( "print \"Donated %.3f %s to the cause.\n\"",
total-value, type ) );