From f15ee5ac6702e14a827a2643bfa893796c5659df Mon Sep 17 00:00:00 2001 From: IronClawTrem Date: Sat, 29 Feb 2020 02:31:53 +0000 Subject: add !practise command --- src/game/g_active.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/game/g_active.c') diff --git a/src/game/g_active.c b/src/game/g_active.c index 5076873..3ef4d0b 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -1474,6 +1474,7 @@ void ClientThink_real( gentity_t *ent ) int msec; usercmd_t *ucmd; int real_pm_type; + pTeam_t team; client = ent->client; @@ -1923,6 +1924,22 @@ void ClientThink_real( gentity_t *ent ) bubble = G_TempEntity( client->ps.origin, EV_PLAYER_TELEPORT_OUT ); bubble->s.clientNum = ent->s.clientNum; } + + if( g_practise.integer ) + { + if( team = PTE_ALIENS ) + { + if( client->pers.credit < 9 ) + G_AddCreditToClient( client, 9, qtrue ); + } + if( team = PTE_HUMANS ) + { + if( client->pers.credit < 2000 ) + G_AddCreditToClient( client, 2000, qtrue ); + else if( client->pers.credit > 2000 ) + G_AddCreditToClient( client, -2000, qtrue ); + } + } } /* -- cgit