
#define PLUGIN_VERSION "1.1.0.2"
#define MAX_PLAYERS 64

// decap cvars
new Handle:cvSpurtInterval = INVALID_HANDLE;
new Handle:cvBloodLoss = INVALID_HANDLE;
new Handle:cvAimTolerance = INVALID_HANDLE;
new Handle:cvCheckInterval = INVALID_HANDLE;
new Handle:cvDecapHeadshot = INVALID_HANDLE;
new Handle:cvDecapKnife = INVALID_HANDLE;
new Handle:cvDecapHE = INVALID_HANDLE;
new Handle:cvTKEnabled = INVALID_HANDLE;

// grabber cvars
new Handle:cvSpeed = INVALID_HANDLE;
new Handle:cvDistance = INVALID_HANDLE; 
new Handle:cvThrowTime = INVALID_HANDLE;
new Handle:cvThrowSpeed = INVALID_HANDLE;
new Handle:cvMaxDistance = INVALID_HANDLE;
new Handle:cvSteal = INVALID_HANDLE;
new Handle:cvDropOnJump = INVALID_HANDLE;

// timers
new Handle:g_SpurtTimer[MAX_PLAYERS+1];

// player data
new g_HeadEnt[MAX_PLAYERS+1];				// players head
new g_HeadLastHolder[MAX_PLAYERS+1];		// who most recently held this
new g_ParticleEnt[MAX_PLAYERS+1];			// players most recent particle
new g_HeldEnt[MAX_PLAYERS+1];				// held object
new g_ThrowPosValid[MAX_PLAYERS+1];		// sanity checking
new Float:g_ThrowPosX[MAX_PLAYERS+1];		// X
new Float:g_ThrowPosY[MAX_PLAYERS+1];		// Y
new Float:g_ThrowPosZ[MAX_PLAYERS+1];		// Z

new Float:g_ThrowCharge[MAX_PLAYERS+1];	// throw charge state 

// chippy
new Float:g_ChippyOrigin[3];
new Float:g_ChippyAngles[3];
new Float:g_ChippyTriggerMin[3];
new Float:g_ChippyTriggerMax[3];
new Float:g_ChippyTrigPos[3];
new g_ChippyEnabled = false;
new g_ChippyEnt = -1;
new g_ChippyWindowsEnt = -1;
new g_ChippyTriggerEnt = -1;

// noise
new String:g_SpurtSound[] = "player/footsteps/grass3.wav";
new String:g_HoldSound[] = "weapons/physcannon/hold_loop.wav";
new String:g_ChippyIdleSound[] = "ambient/machines/diesel_1.wav";
new String:g_ChippyGrind1Sound[] = "npc/manhack/grind_flesh1.wav";
new String:g_ChippyGrind2Sound[] = "npc/manhack/grind_flesh2.wav";
new String:g_ChippyGrind3Sound[] = "npc/manhack/grind_flesh3.wav";
new String:g_ChippyFleshySound[] = "physics/flesh/flesh_bloody_break.wav";
new String:g_ChippySquishy1Sound[] = "physics/flesh/flesh_squishy_impact_hard1.wav";
new String:g_ChippySquishy2Sound[] = "physics/flesh/flesh_squishy_impact_hard2.wav";
new String:g_ChippySquishy3Sound[] = "physics/flesh/flesh_squishy_impact_hard3.wav";
new String:g_ChippySquishy4Sound[] = "physics/flesh/flesh_squishy_impact_hard4.wav";
new String:g_ChippyReject1Sound[] = "npc/manhack/grind1.wav";
new String:g_ChippyReject2Sound[] = "npc/manhack/grind2.wav";
new String:g_ChippyReject3Sound[] = "npc/manhack/grind3.wav";
new String:g_ChippyReject4Sound[] = "npc/manhack/grind4.wav";
new String:g_ChippyReject5Sound[] = "npc/manhack/grind5.wav";
new String:g_AchievementSound[] = "ui/achievement_earned.wav";
