summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2003-03-24 05:10:24 +0000
committerTim Angus <tim@ngus.net>2003-03-24 05:10:24 +0000
commit43933228fc2f0701eac8a424dbec67b2542674c1 (patch)
tree1da6eb147afab9ad9639d355dc2021e36776c21d /src
parent69009832865735cbae52df2fb854f3db2e4febce (diff)
* Fixed a bug where aliens are assumed to have an extra kill
* "give funds" now takes a parameter - the credit to add
Diffstat (limited to 'src')
-rw-r--r--src/game/bg_misc.c2
-rw-r--r--src/game/g_cmds.c9
2 files changed, 8 insertions, 3 deletions
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;