Permalink
Browse files

Revert "Spectators need health too. #SpectatorLivesMatter"

This reverts commit b0f14e1.
  • Loading branch information...
DolceTriade committed Dec 28, 2015
1 parent b22eaba commit 2a6280ae9f127d0da481931de7bcac666c8c8ab9
@@ -1,7 +1,7 @@
#include "SpectatorComponent.h"

SpectatorComponent::SpectatorComponent(Entity& entity, ClientComponent& r_ClientComponent, HealthComponent& r_HealthComponent)
: SpectatorComponentBase(entity, r_ClientComponent, r_HealthComponent)
SpectatorComponent::SpectatorComponent(Entity& entity, ClientComponent& r_ClientComponent)
: SpectatorComponentBase(entity, r_ClientComponent)
{}

void SpectatorComponent::HandlePrepareNetCode() {
@@ -5,29 +5,28 @@
#include "../backend/CBSEComponents.h"

class SpectatorComponent: public SpectatorComponentBase {
public:
// ///////////////////// //
// Autogenerated Members //
// ///////////////////// //

/**
* @brief Default constructor of the SpectatorComponent.
* @param entity The entity that owns the component instance.
* @param r_ClientComponent A ClientComponent instance that this component depends on.
* @param r_HealthComponent A HealthComponent instance that this component depends on.
* @note This method is an interface for autogenerated code, do not modify its signature.
*/
SpectatorComponent(Entity& entity, ClientComponent& r_ClientComponent, HealthComponent& r_HealthComponent);

/**
* @brief Handle the PrepareNetCode message.
* @note This method is an interface for autogenerated code, do not modify its signature.
*/
void HandlePrepareNetCode();

// ///////////////////// //

private:
public:
// ///////////////////// //
// Autogenerated Members //
// ///////////////////// //

/**
* @brief Default constructor of the SpectatorComponent.
* @param entity The entity that owns the component instance.
* @param r_ClientComponent A ClientComponent instance that this component depends on.
* @note This method is an interface for autogenerated code, do not modify its signature.
*/
SpectatorComponent(Entity& entity, ClientComponent& r_ClientComponent);

/**
* @brief Handle the PrepareNetCode message.
* @note This method is an interface for autogenerated code, do not modify its signature.
*/
void HandlePrepareNetCode();

// ///////////////////// //

private:

};

@@ -118,7 +118,6 @@ components:
- PrepareNetCode
requires:
- Client
- Health

AlienClass:
requires:
@@ -1501,7 +1501,10 @@ static void ClientSpawnCBSE(gentity_t *ent, bool evolving) {
// - Call assignment operators on the new components to transfer state from old entity.

case PCL_NONE:
CLIENT_ENTITY_CREATE(SpectatorEntity);
SpectatorEntity::Params params;
params.oldEnt = ent;
params.Client_clientData = client;
ent->entity = new SpectatorEntity(params);
break;

case PCL_ALIEN_BUILDER0: {

0 comments on commit 2a6280a

Please sign in to comment.