diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/bg_misc.c | 2 | ||||
-rw-r--r-- | src/game/g_cmds.c | 9 |
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; |