diff options
author | Tim Angus <tim@ngus.net> | 2003-03-24 05:10:24 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2003-03-24 05:10:24 +0000 |
commit | 43933228fc2f0701eac8a424dbec67b2542674c1 (patch) | |
tree | 1da6eb147afab9ad9639d355dc2021e36776c21d /src/game/g_cmds.c | |
parent | 69009832865735cbae52df2fb854f3db2e4febce (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.c | 9 |
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; |