summaryrefslogtreecommitdiff
path: root/src/game/g_active.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_active.c')
-rw-r--r--src/game/g_active.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c
index dc681996..7b03ce0f 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -201,7 +201,7 @@ static int GetClientMass( gentity_t *ent )
int entMass = 75;
if( ent->client->pers.teamSelection == TEAM_ALIENS )
- entMass = BG_FindHealthForClass( ent->client->pers.classSelection );
+ entMass = BG_Class( ent->client->pers.classSelection )->health;
else if( ent->client->pers.teamSelection == TEAM_HUMANS )
{
if( BG_InventoryContainsUpgrade( UP_BATTLESUIT, ent->client->ps.stats ) )
@@ -333,7 +333,7 @@ void G_TouchTriggers( gentity_t *ent )
if( ent->client->ps.stats[ STAT_HEALTH ] <= 0 )
return;
- BG_FindBBoxForClass( ent->client->ps.stats[ STAT_CLASS ],
+ BG_ClassBoundingBox( ent->client->ps.stats[ STAT_CLASS ],
pmins, pmaxs, NULL, NULL, NULL );
VectorAdd( ent->client->ps.origin, pmins, mins );
@@ -464,7 +464,7 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd )
if( queued )
client->ps.pm_flags |= PMF_QUEUED;
- client->ps.speed = BG_FindSpeedForClass( client->ps.stats[ STAT_CLASS ] );
+ client->ps.speed = BG_Class( client->ps.stats[ STAT_CLASS ] )->speed;
client->ps.stats[ STAT_STAMINA ] = 0;
client->ps.stats[ STAT_MISC ] = 0;
client->ps.stats[ STAT_BUILDABLE ] = 0;
@@ -634,7 +634,7 @@ void ClientTimerActions( gentity_t *ent, int msec )
// Set validity bit on buildable
if( ( client->ps.stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT ) > BA_NONE )
{
- int dist = BG_FindBuildDistForClass( ent->client->ps.stats[ STAT_CLASS ] );
+ int dist = BG_Class( ent->client->ps.stats[ STAT_CLASS ] )->buildDist;
vec3_t dummy;
if( G_CanBuild( ent, client->ps.stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT,
@@ -783,14 +783,14 @@ void ClientTimerActions( gentity_t *ent, int msec )
if( ( ent->lastRegenTime + ALIEN_REGEN_NOCREEP_TIME ) < level.time )
{
ent->health +=
- BG_FindRegenRateForClass( client->ps.stats[ STAT_CLASS ] );
+ BG_Class( client->ps.stats[ STAT_CLASS ] )->regenRate;
ent->lastRegenTime = level.time;
}
}
else
{
ent->health += modifier *
- BG_FindRegenRateForClass( client->ps.stats[ STAT_CLASS ] );
+ BG_Class( client->ps.stats[ STAT_CLASS ] )->regenRate;
ent->lastRegenTime = level.time;
}
}
@@ -804,7 +804,7 @@ void ClientTimerActions( gentity_t *ent, int msec )
level.surrenderTeam == TEAM_ALIENS )
{
G_Damage( ent, NULL, NULL, NULL, NULL,
- BG_FindRegenRateForClass( client->ps.stats[ STAT_CLASS ] ),
+ BG_Class( client->ps.stats[ STAT_CLASS ] )->regenRate,
DAMAGE_NO_ARMOR, MOD_SUICIDE );
}
else if( client->ps.stats[ STAT_TEAM ] == TEAM_HUMANS &&
@@ -819,7 +819,7 @@ void ClientTimerActions( gentity_t *ent, int msec )
{
int maxAmmo;
- BG_FindAmmoForWeapon( WP_ALEVEL3_UPG, &maxAmmo, NULL );
+ maxAmmo = BG_Weapon( WP_ALEVEL3_UPG )->maxAmmo;
if( client->ps.ammo < maxAmmo )
{
@@ -898,11 +898,11 @@ void ClientEvents( gentity_t *ent, int oldEventSequence )
else if( fallDistance > 1.0f )
fallDistance = 1.0f;
- damage = (int)( (float)BG_FindHealthForClass( class ) *
- BG_FindFallDamageForClass( class ) * fallDistance );
+ damage = (int)( (float)BG_Class( class )->health *
+ BG_Class( class )->fallDamage * fallDistance );
VectorSet( dir, 0, 0, 1 );
- BG_FindBBoxForClass( class, mins, NULL, NULL, NULL, NULL );
+ BG_ClassBoundingBox( class, mins, NULL, NULL, NULL, NULL );
mins[ 0 ] = mins[ 1 ] = 0.0f;
VectorAdd( client->ps.origin, mins, point );
@@ -1482,7 +1482,7 @@ void ClientThink_real( gentity_t *ent )
}
// set speed
- client->ps.speed = g_speed.value * BG_FindSpeedForClass( client->ps.stats[ STAT_CLASS ] );
+ client->ps.speed = g_speed.value * BG_Class( client->ps.stats[ STAT_CLASS ] )->speed;
if( client->lastCreepSlowTime + CREEP_TIMEOUT < level.time )
client->ps.stats[ STAT_STATE ] &= ~SS_CREEPSLOWED;