summaryrefslogtreecommitdiff
path: root/src/game/g_active.c
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2015-04-08 21:45:16 +0200
committerPaweł Redman <pawel.redman@gmail.com>2015-04-08 21:45:16 +0200
commitee25f4aadf87fa2852bb345062eeecea9e86d1dc (patch)
treeb7dd37970f250812a67c750d63b901c38fbee35f /src/game/g_active.c
parent0f4407b328c59f132ee5bbf31004d31b81dc3b3b (diff)
Revert human physics to vq3.
Diffstat (limited to 'src/game/g_active.c')
-rw-r--r--src/game/g_active.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 0c84f57..2bf6400 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -631,7 +631,6 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd )
client->ps.pm_flags |= PMF_QUEUED;
client->ps.speed = client->pers.flySpeed;
- client->ps.stats[ STAT_STAMINA ] = 0;
client->ps.stats[ STAT_MISC ] = 0;
client->ps.stats[ STAT_BUILDABLE ] = BA_NONE;
client->ps.stats[ STAT_CLASS ] = PCL_NONE;
@@ -807,26 +806,10 @@ void ClientTimerActions( gentity_t *ent, int msec )
client->ps.stats[ STAT_STATE ] &= ~SS_INVI;
}
- // Restore or subtract stamina
- if( stopped || client->ps.pm_type == PM_JETPACK )
- client->ps.stats[ STAT_STAMINA ] += STAMINA_STOP_RESTORE;
- else if( ( client->ps.stats[ STAT_STATE ] & SS_SPEEDBOOST ) &&
- !( client->buttons & BUTTON_WALKING ) ) // walk overrides sprint
- client->ps.stats[ STAT_STAMINA ] -= STAMINA_SPRINT_TAKE;
- else if( walking || crouched )
- client->ps.stats[ STAT_STAMINA ] += STAMINA_WALK_RESTORE;
-
- // Check stamina limits
- if( client->ps.stats[ STAT_STAMINA ] > STAMINA_MAX )
- client->ps.stats[ STAT_STAMINA ] = STAMINA_MAX;
- else if( client->ps.stats[ STAT_STAMINA ] < -STAMINA_MAX )
- client->ps.stats[ STAT_STAMINA ] = -STAMINA_MAX;
-
- // Regenerate health and stamina if we have got a Biokit
+ // Regenerate health if we have got a Biokit
if( BG_InventoryContainsUpgrade( UP_BIOKIT, client->ps.stats ) )
{
int rate_health = BIOKIT_HEALTH_RATE;
- int rate_stamina = BIOKIT_STAMINA_RATE;
if( ent->nextRegenTime < level.time && ent->health > 0 && rate_health > 0 &&
ent->health < client->ps.stats[ STAT_MAX_HEALTH ] )
@@ -840,9 +823,6 @@ void ClientTimerActions( gentity_t *ent, int msec )
ent->nextRegenTime = level.time + 5000/rate_health;
ent->client->alreadyRegenerated = qtrue;
}
-
- if( client->ps.stats[ STAT_STAMINA ] + rate_stamina <= STAMINA_MAX )
- client->ps.stats[ STAT_STAMINA ] += rate_stamina;
}
if( weapon == WP_ABUILD ||