diff options
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r-- | src/game/g_cmds.c | 25 |
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 ) ); |