summaryrefslogtreecommitdiff
path: root/src/game/g_cmds.c
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/game/g_cmds.c
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/game/g_cmds.c')
-rw-r--r--src/game/g_cmds.c9
1 files changed, 7 insertions, 2 deletions
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;