/*
* Charged Turbo
* @version: 9-13-2006
* @author: Joseph 'Pcjoe' Florencio
*/

#ifndef CHARGEDTURBO_H
#define CHARGEDTURBO_H

class CChargedTurbo
{
#ifndef CLIENT_DLL
public:
	// Constructor
	CChargedTurbo();

	// Reset
	void Reset( void );

	// Disable charged turbo
	void disableChargedTurbo( void );

	// Manage charged turbo
	void manageChargedTurbo( void );

	// Turbo key press
	void turboKeyPress( void );

	// Turbo key release
	void turboKeyRelease( void );

	// Start Active Charge
	void startActiveCharge( void );

	// Stop Active Charge
	void stopActiveCharge( void );

	// Update Settle (enabling settling of powerlevel)
	void updateSettle( void );

	// settle amount (using settle timer)
	void settleAmount( float &actual, float desired );

	// Get turbo multiplier
	float getTurboMultiplier( void );

	// Get KI Burn
	int getKIBurn( void );

	// Get charge time
	float getChargeTime( void );

	// Is chargeturbo active
	BOOL isChargeTurboActive( void );

	// Set Owner
	void setOwner( CBasePlayer *pPlayer );

private:

	// calculate turbo multipliers
	void calculateMultipliers( void );

	// Get charged turbo pl multiplier
	float getChargedTurboMultiplier( void );

	// Update time delta
	void updateTimeDelta( void );

	// Set Last Time
	void setLastTime( void );

	CBasePlayer *m_pOwner;			// Player ptr
	BOOL	m_fChargedTurbo;		// Charged turbo is active
	BOOL	m_fChargedTurboActive;	// Currently charging turbo (exponential pl increase)
	float	m_flTurboKeyPress;		// Last time the turbo key was pressed
	float	m_flTurboStatusChange;	// Last time turbo was turned off/on
	float	m_flChargeTurboActiveStop; // Time we stopped our active charged turbo
	float	m_flChargeTurboTime;	// Time we've been charging this turbo
	float	m_flChargedTurboPercent;// Percent which charged turbo is at
	float	m_flTurboMultiplier;	// General turbo multiplier, including regular and charged turbo
	float	m_flSettleTime;			// Time at which we disabled/enabled a new mode, and we need the pl to interpolate there
	float	m_flTimeDelta;			// Time delta
	float	m_flLastTime;			// Used to update time delta
#endif
};

#endif
