Permalink
Browse files

Revert "Correctly transmit spectator health"

This reverts commit 6a9b17b.
  • Loading branch information...
DolceTriade committed Dec 11, 2015
1 parent dec19a7 commit 5e72438dcf71d3641dda64b59379787078260028
Showing with 1 addition and 7 deletions.
  1. +1 −7 src/sgame/components/HealthComponent.cpp
@@ -18,13 +18,7 @@ void HealthComponent::HandlePrepareNetCode() {
gclient_t *client = entity.oldEnt->client;

if (client) {
// if we are doing a chase cam or a remote view, grab the latest info
if (client->sess.spectatorState == SPECTATOR_FOLLOW) {
gentity_t *otherEnt = &g_entities[ entity.oldEnt->client->sess.spectatorClient ];
const HealthComponent *otherComp = otherEnt->entity->Get<HealthComponent>();
maxHealth = otherComp->maxHealth;
transmittedHealth = Math::Clamp((int)std::ceil(otherComp->health), -999, 999);
} else if (client->ps.stats[STAT_HEALTH] != transmittedHealth) {
if (client->ps.stats[STAT_HEALTH] != transmittedHealth) {
client->pers.infoChangeTime = level.time;
}
client->ps.stats[STAT_HEALTH] = transmittedHealth;

0 comments on commit 5e72438

Please sign in to comment.