AvHBaseBuildable.h

 ifndef AVH_BASE_BUILDABLE_H
define AVH_BASE_BUILDABLE_H
include "../util/nowarnings.h"
include "../dlls/extdll.h"
include "../dlls/util.h"
include "AvHConstants.h"
include "../dlls/cbase.h"
include "AvHMessage.h"
include "AvHSpecials.h"
include "AvHPlayer.h"
include "AvHCloakable.h"
include "AvHBuildable.h"
class AvHBaseBuildable : public CBaseAnimating, public AvHBuildable, public AvHCloakable
{
public:
AvHBaseBuildable(AvHTechID inTechID, AvHMessageID inMessageID, char* inClassName, int inUser3 = AVH_USER3_NONE);
void EXPORT AnimateThink(); virtual int BloodColor(void); void EXPORT BuildableTouch(CBaseEntity* inEntity); virtual void CheckEnabledState(); void EXPORT ConstructUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ); virtual bool Energize(float inEnergyAmount); void EXPORT FallThink(void); virtual void FireDeathTarget() const; virtual void FireSpawnTarget() const; virtual int GetBaseHealth() const; virtual int GetIdleAnimation() const; virtual bool GetIsRecycling() const; virtual CBaseEntity* GetAttacker(); virtual char* GetClassName() const; virtual char* GetDeploySound() const; virtual bool GetIsBuilt(void) const; virtual bool GetIsOrganic() const; virtual bool GetIsTechActive() const; virtual char* GetKilledSound() const; virtual int GetActiveAnimation() const; virtual int GetDeployAnimation() const; virtual int GetIdle1Animation() const; virtual int GetIdle2Animation() const; virtual bool GetIsTechnologyAvailable(AvHMessageID inMessageID) const; virtual int GetKilledAnimation() const; virtual AvHMessageID GetMessageID() const; virtual int GetMoveType() const; virtual int GetSequenceForBoundingBox() const; virtual bool GetTriggerAlertOnDamage() const; virtual float GetTimeAnimationDone() const; virtual int GetRecycleAnimation() const; virtual int GetResearchAnimation() const; virtual int GetSpawnAnimation() const; virtual int GetTakeDamageAnimation() const; virtual char* GetModelName() const; virtual float GetNormalizedBuildPercentage() const; virtual float GetTimeForAnimation(int inIndex) const; virtual void SetResearching(bool inState); virtual bool GetIsPersistent() const; virtual AvHTeamNumber GetTeamNumber() const; virtual void HealthChanged(); virtual void KeyValue(KeyValueData* pkvd); virtual void Killed(entvars_t* pevAttacker, int iGib); virtual int ObjectCaps(void); // Pass -1 to play an animation backwards virtual void PlayAnimationAtIndex(int inIndex, bool inForce = false, float inFrameRate = 1.0f); virtual void Precache(void); virtual bool Regenerate(float inRegenerationAmount, bool inPlaySound = true, bool dcHealing = false); virtual void ResetEntity(); virtual void SetConstructionComplete(bool inForce = false); virtual void SetAverageUseSoundLength(float inLength); virtual void StartRecycle(); virtual void Spawn(); virtual int TakeDamage(entvars_t* inInflictor, entvars_t* inAttacker, float inDamage, int inBitsDamageType); virtual void TechnologyBuilt(AvHMessageID inMessageID); virtual void WorldUpdate(); virtual void UpdateOnRecycle(); virtual Vector EyePosition( );
protected:
virtual bool GetHasBeenKilled() const;
int GetStartAlpha() const; void Init(); void InternalInitializeBuildable(); void InternalSetConstructionComplete(bool inForce = false); virtual void Materialize(); void EXPORT RecycleComplete(); // Called when a persistent buildable is killed virtual void SetActive(); virtual void SetInactive(); virtual void SetNormalizedBuildPercentage(float inPercentage, bool inForceIfComplete = false); void SetPersistent(); void SetSelectID(int inSelectID); virtual void TriggerDeathAudioVisuals(bool isRecycled=false); void UpdateAutoBuild(float inTimePassed); void UpdateAutoHeal(); void UpdateDamageEffects(); virtual void UpdateTechSlots(); int mBaseHealth; AvHMessageID mMessageID;
private:
char* mClassName; char* mModelName; int mSelectID; //float mPercentageBuilt; float mLastTimePlayedSound; float mTimeToConstruct; const int kStartAlpha; float mAverageUseSoundLength; int mLastAnimationPlayed; float mTimeAnimationDone; // Marks entity to not be removed on level reset bool mPersistent; int mElectricalSprite; bool mIsResearching; string mTargetOnSpawn; string mTargetOnDeath; float mTimeOfLastAutoHeal; bool mInternalSetConstructionComplete; float mTimeOfLastDamageEffect; float mTimeOfLastDamageUpdate; float mTimeRecycleStarted; float mTimeRecycleDone; float mTimeOfLastDCRegeneration; bool mKilled; bool mGhost;
};
endif