From 43933228fc2f0701eac8a424dbec67b2542674c1 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Mon, 24 Mar 2003 05:10:24 +0000 Subject: * Fixed a bug where aliens are assumed to have an extra kill * "give funds" now takes a parameter - the credit to add --- src/game/bg_misc.c | 2 +- src/game/g_cmds.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 7bb663f7..ed0f56ac 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -1978,7 +1978,7 @@ int BG_ClassCanEvolveFromTo( int fclass, int tclass, int credits, int num ) int i, j; //base case - if( credits + 1 == 0 ) + if( credits == 0 ) return 0; if( tclass == PCL_NONE ) diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 4deac46a..98cd511b 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -192,9 +192,14 @@ void Cmd_Give_f( gentity_t *ent ) return; } - if( give_all || Q_stricmp( name, "funds" ) == 0 ) + if( give_all || Q_stricmpn( name, "funds", 5 ) == 0 ) { - ent->client->ps.persistant[ PERS_CREDIT ] += 123; + int credits = atoi( name + 6 ); + + if( !credits ) + ent->client->ps.persistant[ PERS_CREDIT ]++; + else + ent->client->ps.persistant[ PERS_CREDIT ] += credits; if( !give_all ) return; -- cgit