diff options
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r-- | src/game/g_cmds.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index d6126c8..470376d 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -708,6 +708,7 @@ void G_ChangeTeam( gentity_t *ent, pTeam_t newTeam ) ent->client->pers.score = 0; } + ent->client->ps.persistant[ PERS_CREDIT ] = ent->client->pers.funds; ent->client->ps.persistant[ PERS_KILLED ] = 0; ent->client->pers.statscounters.kills = 0; ent->client->pers.statscounters.structskilled = 0; @@ -3266,7 +3267,7 @@ void Cmd_Class_f( gentity_t *ent ) numLevels = BG_ClassCanEvolveFromTo( currentClass, newClass, - (short)ent->client->ps.persistant[ PERS_CREDIT ], 0 ); + floorf( ent->client->pers.funds ), 0 ); if( G_RoomForClassChange( ent, newClass, infestOrigin ) ) { @@ -3925,7 +3926,7 @@ void Cmd_Buy_f( gentity_t *ent ) } //can afford this? - if( BG_FindPriceForWeapon( weapon ) > (short)ent->client->ps.persistant[ PERS_CREDIT ] ) + if( BG_FindPriceForWeapon( weapon ) > ent->client->pers.funds ) { G_TriggerMenu( ent->client->ps.clientNum, MN_H_NOFUNDS ); return; @@ -3996,7 +3997,7 @@ void Cmd_Buy_f( gentity_t *ent ) } //can afford this? - if( BG_FindPriceForUpgrade( upgrade ) > (short)ent->client->ps.persistant[ PERS_CREDIT ] ) + if( BG_FindPriceForUpgrade( upgrade ) > ent->client->pers.funds ) { G_TriggerMenu( ent->client->ps.clientNum, MN_H_NOFUNDS ); return; @@ -5029,7 +5030,7 @@ void Cmd_PTRCRestore_f( gentity_t *ent ) G_ChangeTeam( ent, connection->clientTeam ); // set the correct credit etc. - ent->client->ps.persistant[ PERS_CREDIT ] = 0; + ent->client->pers.funds = 0; G_AddFundsToClient( ent->client, connection->clientCredit, qtrue ); ent->client->pers.score = connection->clientScore; ent->client->pers.enterTime = connection->clientEnterTime; |