summaryrefslogtreecommitdiff
path: root/src/game/g_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_client.c')
-rw-r--r--src/game/g_client.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/game/g_client.c b/src/game/g_client.c
index 5b3f122..ac4a081 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -81,7 +81,7 @@ void SP_info_human_intermission( gentity_t *ent )
static int compare_client_funds(const void *c1, const void *c2)
{
- return (((const gclient_t *)c1)->pers.credit - ((const gclient_t *)c2)->pers.credit);
+ return (((const gclient_t *)c1)->pers.funds - ((const gclient_t *)c2)->pers.funds);
}
/*
@@ -129,24 +129,24 @@ static void G_OverflowFunds(gclient_t *donor, float funds)
break;
if (target->ps.stats[STAT_PTEAM] == PTE_ALIENS) {
- buffer = target->pers.credit + target->pers.fractionalCredit + funds - max;
+ buffer = target->pers.funds + target->pers.fractionalCredit + funds - max;
} else {
funds = floor(funds);
- buffer = target->pers.credit + funds - max;
+ buffer = target->pers.funds + funds - max;
}
if (buffer > 0) {
- target->pers.credit = max;
+ target->pers.funds = max;
target->pers.fractionalCredit = 0.0f;
} else {
- target->pers.credit += floor(funds);
+ target->pers.funds += floor(funds);
target->pers.fractionalCredit += funds - floor(funds);
}
funds = buffer;
// synchronize PERS_CREDIT
- target->ps.persistant[PERS_CREDIT] = (int)target->pers.credit;
+ target->ps.persistant[PERS_CREDIT] = (int)target->pers.funds;
}
}
@@ -176,25 +176,25 @@ void G_AddFundsToClient(gclient_t *client, float funds, qboolean cap)
max = HUMAN_MAX_CREDITS;
}
- buffer = client->pers.credit + funds - max;
+ buffer = client->pers.funds + funds - max;
if (buffer > 0) {
G_OverflowFunds(client, buffer + client->pers.fractionalCredit);
- client->pers.credit = max;
+ client->pers.funds = max;
client->pers.fractionalCredit = 0.0f;
} else {
- client->pers.credit += (short)funds;
+ client->pers.funds += (short)funds;
}
} else {
- client->pers.credit += (short)funds;
+ client->pers.funds += (short)funds;
}
- if (client->pers.credit < 0)
- client->pers.credit = 0;
+ if (client->pers.funds < 0)
+ client->pers.funds = 0;
// keep PERS_CREDIT in sync if not following
if (client->sess.spectatorState != SPECTATOR_FOLLOW)
- client->ps.persistant[PERS_CREDIT] = client->pers.credit;
+ client->ps.persistant[PERS_CREDIT] = client->pers.funds;
}
@@ -2066,7 +2066,7 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles
// restore really persistant things
client->ps.persistant[ PERS_SCORE ] = client->pers.score;
- client->ps.persistant[ PERS_CREDIT ] = client->pers.credit;
+ client->ps.persistant[ PERS_CREDIT ] = client->pers.funds;
client->airOutTime = level.time + 12000;