CounterStrike clone
Created By: Koolio
eMail: koolio@mdqnet.net
Difficulty Scale: Hard


Well, you did the menu tut and you can have two different models to play as. If you tried it in multiplayer you must've noticed that the frames are messed up. Today we're going to do something about that. Open up the file called player.qc and look at the top, where you'll find stuff like:

//
// running
//
$frame axrun1 axrun2 axrun3 axrun4 axrun5 axrun6

$frame rockrun1 rockrun2 rockrun3 rockrun4 rockrun5 rockrun6
These $frame definitions are used to keep track of frames. They actually represent numbers. So instead of axrun1 you could use 0 instead. (Note: Counting starts at 0) The problem is that Q2 player models (the ones we use are converted Q2 models) have their frames organised differently.

I totally changed player.qc and added some extra things as well. It's too long to explain it all in a tutorial so it'd be better if you'd just download it and read through it. If you read through it you'll notice some crouching parts commented out. That's because crouching is not yet implemented. Well, I implemented it but I'll write a tut for it later on. Now when you compile this you'll notice the frames are correct. Have fun!

All code not originally found and stuff changed in player.qc written by Koolio. Tutorial written by Koolio, koolio@mdqnet.net, and HTML-ized by Kryten, kryten@inside3d.com You can use this tut in your mod provided you give me credit.



Player.qc

//Koolio, koolio@mdqnet.net
//Playerframes rewritten to contain the Q2 player frames instead of the Q1 ranger frames
//Also added the flipoff, crouch etc...
//If you use this, some credit would be nice
void() bubble_bob;

/*
==============================================================================

PLAYER

==============================================================================
*/
//Unneeded
$cd id1/models/player_4
$origin 0 -6 24
$base base		
$skin skin

//
// Standing
//
$frame stand1 stand2 stand3 stand4 stand5 stand6 stand7 stand8
$frame stand9 stand10 stand11 stand12 stand13 stand14 stand15
$frame stand16 stand17 stand18 stand19 stand20 stand21 stand22
$frame stand23 stand24 stand25 stand26 stand27 stand28 stand29
$frame stand30 stand31 stand32 stand33 stand34 stand35 stand36
$frame stand37 stand38 stand39 stand40
//Ugh, I'm bored already =)

// 
// Running
//
$frame run1 run2 run3 run4 run5 run6
//That wasn't so hard

//
// attacking
//
$frame attack1 attack2 attack3 attack4 attack5 attack6 attack7 attack8
//Still doable

//
// Pain
//

//sequence 1
$frame pain1 pain2 pain3 pain4
//sequence 2
$frame pain5 pain6 pain7 pain8
//sequence 3
$frame pain9 pain10 pain11 pain12
//Still doing it

//
// jump
//
$frame jump1 jump2 jump3 jump4 jump5 jump6
//Not even at the half

//
// flip-off
//

$frame flip1 flip2 flip3 flip4 flip5 flip6
$frame flip7 flip8 flip9 flip10 flip11 flip12
//Did you just give me the finger?

//
// Salute
//
$frame salute1 salute2 salute3 salute4 salute5 salute6
$frame salute7 salute8 salute9 salute10 salute11
//This is getting boring

//
// Taunt
//
$frame taunt1 taunt2 taunt3 taunt4 taunt5 taunt6 taunt7
$frame taunt8 taunt9 taunt10 taunt11 taunt12 taunt13
$frame taunt14 taunt15 taunt16 taunt17
//Make it stop

//
// wave
//
$frame wave1 wave2 wave3 wave4 wave5 wave6 wave7 wave8
$frame wave9 wave10 wave11
//When does it stop?

//
// Point
//
$frame point1 point2 point3 point4 point5 point6
$frame point7 point8 point9 point10 point11 point12
//Enough already

//
// Crouch Stand
//
$frame crstand1 crstand2 crstand3 crstand4 crstand5 crstand6 crstand7
$frame crstand8 crstand9 crstand10 crstand11 crstand12 crstand13 crstand14
$frame crstand15 crstand16 crstand17 crstand18 crstand19 
//I'm begining to hate frames now

//
// Crouch Walk
//
$frame crwalk1 crwalk2 crwalk3 crwalk4 crwalk5 crwalk6
//Here we are at frame 4572952 and still doing it

//
// Crouch Attack
//
$frame crattack1 crattack2 crattack3 crattack4 crattack5 crattack6
$frame crattack7 crattack8 crattack9
//I'm so bored I almost fall asleep

//
// Crouch Pain
//
$frame crpain1 crpain2 crpain3 crpain4
//Didley doo

//
//Crouch Death
//
$frame crdeath1 crdeath2 crdeath3 crdeath4 crdeath5
//.........

//
// Death
//
//sequence 1
$frame death1 death2 death3 death4 death5 death6
//sequence 2
$frame death7 death8 death9 death10 death11 death12
//sequence 3
$frame death13 death14 death15 death16 death17 death18 death19 death20
//Wow, I made it!



/*
==============================================================================
PLAYER
==============================================================================
*/

void() player_run;

//============================================================================
//		Player Crouching
//============================================================================
void()	player_crouch; //Declare for the crouch bit

void()	player_crrun =[	$crwalk1,	player_crrun	]
{
	self.weaponframe=0;
	if (!self.velocity_x && !self.velocity_y)
	{
		self.walkframe=0;
		player_crouch();
		return;
	}
		if (self.walkframe >= 6)
			self.walkframe = 0;
		self.frame = self.frame + self.walkframe;

	self.walkframe = self.walkframe + 1;
};

void() player_crouch = [ $crstand1, player_crouch ]
{
	self.weaponframe=0;
	if (self.velocity_x || self.velocity_y)
	{
		self.walkframe=0;
		player_crrun();
		return;
	}
	
	if (self.walkframe >= 18)
	self.walkframe = 0;
	self.frame = $crstand1 + self.walkframe;


self.walkframe = self.walkframe + 1;

};

void()	player_stand1 =[	$stand1,	player_stand1	]
{

//	if (self.crouch == 1)
	//{
//	player_crouch();
	//return;
//	}
	self.weaponframe=0;
	if (self.velocity_x || self.velocity_y)
	{
		self.walkframe=0;
		player_run();
		return;
	}


		if (self.walkframe >= 39)
			self.walkframe = 0;
		self.frame = $stand1 + self.walkframe;

		self.walkframe = self.walkframe + 1;	
};


void()	player_run =[	$run1,	player_run	]
{
	self.weaponframe=0;
	if (!self.velocity_x && !self.velocity_y)
	{
		self.walkframe=0;
		player_stand1();
		return;
	}
	
//		if (self.crouch == 1)
//	{
//	player_crrun();
//	return;
//	}
		if (self.walkframe >= 6)
			self.walkframe = 0;
		self.frame = self.frame + self.walkframe;

	self.walkframe = self.walkframe + 1;
};


void()	player_shot1 =	[$attack1, player_shot2	] {self.weaponframe=1;
self.effects = self.effects | EF_MUZZLEFLASH;};
void()	player_shot2 =	[$attack2, player_shot3	] {self.weaponframe=2;};
void()	player_shot3 =	[$attack3, player_shot4	] {self.weaponframe=3;};
void()	player_shot4 =	[$attack4, player_shot5	] {self.weaponframe=4;};
void()	player_shot5 =	[$attack5, player_shot6	] {self.weaponframe=5;};
void()	player_shot6 =	[$attack6, player_shot7	] {self.weaponframe=6;};
void()	player_shot7 =	[$attack7, player_shot8	] {self.weaponframe=7;};
void()	player_shot8 =	[$attack8, player_run	] {self.weaponframe=8;};

void()	player_axe1 =	[$attack1, player_axe2	] {self.weaponframe=1;};
void()	player_axe2 =	[$attack2, player_axe3	] {self.weaponframe=2;};
void()	player_axe3 =	[$attack3, player_axe4	] {self.weaponframe=3;W_FireAxe();};
void()	player_axe4 =	[$attack4, player_axe5	] {self.weaponframe=4;};
void()	player_axe5 =	[$attack5, player_axe6	] {self.weaponframe=5;};
void()	player_axe6 =	[$attack6, player_axe7	] {self.weaponframe=6;};
void()	player_axe7 =	[$attack7, player_axe8	] {self.weaponframe=7;};
void()	player_axe8 =	[$attack8, player_run	] {self.weaponframe=8;};

void()	player_axeb1 =	[$attack1, player_axeb2	] {self.weaponframe=1;};
void()	player_axeb2 =	[$attack2, player_axeb3	] {self.weaponframe=2;};
void()	player_axeb3 =	[$attack3, player_axeb4	] {self.weaponframe=3;W_FireAxe();};
void()	player_axeb4 =	[$attack4, player_axeb5	] {self.weaponframe=4;};
void()	player_axeb5 =	[$attack5, player_axeb6	] {self.weaponframe=5;};
void()	player_axeb6 =	[$attack6, player_axeb7	] {self.weaponframe=6;};
void()	player_axeb7 =	[$attack7, player_axeb8	] {self.weaponframe=7;};
void()	player_axeb8 =	[$attack8, player_run	] {self.weaponframe=8;};

void()	player_axec1 =	[$attack1, player_axec2	] {self.weaponframe=1;};
void()	player_axec2 =	[$attack2, player_axec3	] {self.weaponframe=2;};
void()	player_axec3 =	[$attack3, player_axec4	] {self.weaponframe=3;W_FireAxe();};
void()	player_axec4 =	[$attack4, player_axec5	] {self.weaponframe=4;};
void()	player_axec5 =	[$attack5, player_axec6	] {self.weaponframe=5;};
void()	player_axec6 =	[$attack6, player_axec7	] {self.weaponframe=6;};
void()	player_axec7 =	[$attack7, player_axec8	] {self.weaponframe=7;};
void()	player_axec8 =	[$attack8, player_run	] {self.weaponframe=8;};

void()	player_axed1 =	[$attack1, player_axed2	] {self.weaponframe=1;};
void()	player_axed2 =	[$attack2, player_axed3	] {self.weaponframe=2;};
void()	player_axed3 =	[$attack3, player_axed4	] {self.weaponframe=3;W_FireAxe();};
void()	player_axed4 =	[$attack4, player_axed5	] {self.weaponframe=4;};
void()	player_axed5 =	[$attack5, player_axed6	] {self.weaponframe=5;};
void()	player_axed6 =	[$attack6, player_axed7	] {self.weaponframe=6;};
void()	player_axed7 =	[$attack7, player_axed8	] {self.weaponframe=7;};
void()	player_axed8 =	[$attack8, player_run	] {self.weaponframe=8;};


//============================================================================

void() player_nail1   =[$attack4, player_nail2  ] 		//Koolio, changed $attack1 to 4
{
	self.effects = self.effects | EF_MUZZLEFLASH;

	if (!self.button0)
		{player_run ();return;}
	self.weaponframe = self.weaponframe + 1;
	if (self.weaponframe == 9)
		self.weaponframe = 1;
	SuperDamageSound();
	W_FireSpikes (4);
	self.attack_finished = time + 0.2;
};
void() player_nail2   =[$attack5, player_nail1  ]		//Koolio, changed $attack2 to 5
{
	self.effects = self.effects | EF_MUZZLEFLASH;

	if (!self.button0)
		{player_run ();return;}
	self.weaponframe = self.weaponframe + 1;
	if (self.weaponframe == 9)
		self.weaponframe = 1;
	SuperDamageSound();
	W_FireSpikes (-4);
	self.attack_finished = time + 0.2;
};

//============================================================================

void() player_light1   =[$attack4, player_light2  ] 	//Koolio, changed $attack1 to 4
{
	self.effects = self.effects | EF_MUZZLEFLASH;

	if (!self.button0)
		{player_run ();return;}
	self.weaponframe = self.weaponframe + 1;
	if (self.weaponframe == 5)
		self.weaponframe = 1;
	SuperDamageSound();
	W_FireLightning();
	self.attack_finished = time + 0.2;
};
void() player_light2   =[$attack5, player_light1  ]	//changed $attack2 to 5
{
	self.effects = self.effects | EF_MUZZLEFLASH;

	if (!self.button0)
		{player_run ();return;}
	self.weaponframe = self.weaponframe + 1;
	if (self.weaponframe == 5)
		self.weaponframe = 1;
	SuperDamageSound();
	W_FireLightning();
	self.attack_finished = time + 0.2;
};

//============================================================================

//Crouch attack
void() player_crattack = [$crattack1, player_crattack2 ] {self.weaponframe = 1;
self.effects = self.effects | EF_MUZZLEFLASH;};
void() player_crattack2 = [$crattack2, player_crattack3 ] {self.weaponframe = 2;};
void() player_crattack3 = [$crattack3, player_crattack4 ] {self.weaponframe = 3;};
void() player_crattack4 = [$crattack4, player_crattack5 ] {self.weaponframe = 4;};
void() player_crattack5 = [$crattack5, player_crattack6 ] {self.weaponframe = 5;};
void() player_crattack6 = [$crattack6, player_crattack7 ] {self.weaponframe = 6;};
void() player_crattack7 = [$crattack7, player_crattack8 ] {self.weaponframe = 7;};
void() player_crattack8 = [$crattack8, player_crattack9 ] {self.weaponframe = 8;};
void() player_crattack9 = [$crattack9, player_crrun ] {self.weaponframe = 9;};


void() player_rocket1   =[$attack1, player_rocket2  ] {self.weaponframe=1;
self.effects = self.effects | EF_MUZZLEFLASH;};
void() player_rocket2   =[$attack2, player_rocket3  ] {self.weaponframe=2;};
void() player_rocket3   =[$attack3, player_rocket4  ] {self.weaponframe=3;};
void() player_rocket4   =[$attack4, player_rocket5  ] {self.weaponframe=4;};
void() player_rocket5   =[$attack5, player_rocket6  ] {self.weaponframe=5;};
void() player_rocket6   =[$attack6, player_rocket7  ] {self.weaponframe=6;};
void() player_rocket7   =[$attack7, player_rocket8  ] {self.weaponframe=7;};
void() player_rocket8   =[$attack8, player_run  ] {self.weaponframe=8;};

void(float num_bubbles) DeathBubbles;

void() PainSound =
{
local float		rs;

	if (self.health < 0)
		return;

	if (damage_attacker.classname == "teledeath")
	{
		sound (self, CHAN_VOICE, "player/teledth1.wav", 1, ATTN_NONE);
		return;
	}

// water pain sounds
	if (self.watertype == CONTENT_WATER && self.waterlevel == 3)
	{
		DeathBubbles(1);
		if (random() > 0.5)
			sound (self, CHAN_VOICE, "player/drown1.wav", 1, ATTN_NORM);
		else
			sound (self, CHAN_VOICE, "player/drown2.wav", 1, ATTN_NORM);
		return;
	}

// slime pain sounds
	if (self.watertype == CONTENT_SLIME)
	{
// FIX ME	put in some steam here
		if (random() > 0.5)
			sound (self, CHAN_VOICE, "player/lburn1.wav", 1, ATTN_NORM);
		else
			sound (self, CHAN_VOICE, "player/lburn2.wav", 1, ATTN_NORM);
		return;
	}

	if (self.watertype == CONTENT_LAVA)
	{
		if (random() > 0.5)
			sound (self, CHAN_VOICE, "player/lburn1.wav", 1, ATTN_NORM);
		else
			sound (self, CHAN_VOICE, "player/lburn2.wav", 1, ATTN_NORM);
		return;
	}

	if (self.pain_finished > time)
	{
		self.axhitme = 0;
		return;
	}
	self.pain_finished = time + 0.5;

// don't make multiple pain sounds right after each other

// ax pain sound
	if (self.axhitme == 1)
	{
		self.axhitme = 0;
		sound (self, CHAN_VOICE, "player/axhit1.wav", 1, ATTN_NORM);
		return;
	}
	

	rs = rint((random() * 5) + 1);

	self.noise = "";
	if (rs == 1)
		self.noise = "player/pain1.wav";
	else if (rs == 2)
		self.noise = "player/pain2.wav";
	else if (rs == 3)
		self.noise = "player/pain3.wav";
	else if (rs == 4)
		self.noise = "player/pain4.wav";
	else if (rs == 5)
		self.noise = "player/pain5.wav";
	else
		self.noise = "player/pain6.wav";

	sound (self, CHAN_VOICE, self.noise, 1, ATTN_NORM);
	return;
};

void()	player_pain1 =	[	$pain1,	player_pain2	] {PainSound();self.weaponframe=0;};
void()	player_pain2 =	[	$pain2,	player_pain3	] {};
void()	player_pain3 =	[	$pain3,	player_pain4	] {};
void()	player_pain4 =	[	$pain4,	player_run	] {};

void()	player_painb1 =	[	$pain5,	player_painb2	] {PainSound();self.weaponframe=0;};
void()	player_painb2 =	[	$pain6,	player_painb3	] {};
void()	player_painb3 =	[	$pain7,	player_painb4	] {};
void()	player_painb4 =	[	$pain8,	player_run	] {};

void()	player_painc1 =	[	$pain9,	player_painc2	] {PainSound();self.weaponframe=0;};
void()	player_painc2 =	[	$pain10,	player_painc3	] {};
void()	player_painc3 =	[	$pain11,	player_painc4	] {};
void()	player_painc4 =	[	$pain12,	player_run	] {};

//Crouch pain

void()	player_crpain1 =	[	$crpain1,	player_crpain2	] {PainSound();self.weaponframe=0;};
void()	player_crpain2 =	[	$crpain2,	player_crpain3	] {};
void()	player_crpain3 =	[	$crpain3,	player_crpain4	] {};
void()	player_crpain4 =	[	$crpain4,	player_crrun	] {};



void() player_pain =
{
local float		i;

	if (self.weaponframe)
		return;

	if (self.invisible_finished > time)
		return;		// eyes don't have pain frames

	/*
	if (random() < 1)
		player_painb1();
	else if (random() < 0.6)
		player_painc1();
	else
		player_pain1();
	*/
	i = cvar("temp1");
	if (!i)
		i = 1 + floor(random()*4);
	
//	if (self.crouch == 1)	//if I'm croucing
//	player_crpain1();		//show crouch pain frames

	//else do normal pain frames
	else if (i == 1)
		player_pain1();
	else if (i == 2)
		player_painb1();
	else 
		player_painc1();
};


void() player_diea1;
void() player_dieb1;
void() player_diec1;

void() DeathBubblesSpawn =
{
local entity	bubble;
	if (self.owner.waterlevel != 3)
		return;
	bubble = spawn();
	setmodel (bubble, "progs/s_bubble.spr");
	setorigin (bubble, self.owner.origin + '0 0 24');
	bubble.movetype = MOVETYPE_NOCLIP;
	bubble.solid = SOLID_NOT;
	bubble.velocity = '0 0 15';
	bubble.nextthink = time + 0.5;
	bubble.think = bubble_bob;
	bubble.classname = "bubble";
	bubble.frame = 0;
	bubble.cnt = 0;
	setsize (bubble, '-8 -8 -8', '8 8 8');
	self.nextthink = time + 0.1;
	self.think = DeathBubblesSpawn;
	self.air_finished = self.air_finished + 1;
	if (self.air_finished >= self.bubble_count)
		remove(self);
};

void(float num_bubbles) DeathBubbles =
{
local entity	bubble_spawner;
	
	bubble_spawner = spawn();
	setorigin (bubble_spawner, self.origin);
	bubble_spawner.movetype = MOVETYPE_NONE;
	bubble_spawner.solid = SOLID_NOT;
	bubble_spawner.nextthink = time + 0.1;
	bubble_spawner.think = DeathBubblesSpawn;
	bubble_spawner.air_finished = 0;
	bubble_spawner.owner = self;
	bubble_spawner.bubble_count = num_bubbles;
	return;
};


void() DeathSound =
{
local float		rs;

	// water death sounds
	if (self.waterlevel == 3)
	{
		DeathBubbles(20);
		sound (self, CHAN_VOICE, "player/h2odeath.wav", 1, ATTN_NONE);
		return;
	}
	
	rs = rint ((random() * 4) + 1);
	if (rs == 1)
		self.noise = "player/death1.wav";
	if (rs == 2)
		self.noise = "player/death2.wav";
	if (rs == 3)
		self.noise = "player/death3.wav";
	if (rs == 4)
		self.noise = "player/death4.wav";
	if (rs == 5)
		self.noise = "player/death5.wav";

	sound (self, CHAN_VOICE, self.noise, 1, ATTN_NONE);
	return;
};


void() PlayerDead =
{
	self.nextthink = -1;
// allow respawn after a certain time
	self.deadflag = DEAD_DEAD;
};

vector(float dm) VelocityForDamage =
{
	local vector v;

	v_x = 100 * crandom();
	v_y = 100 * crandom();
	v_z = 200 + 100 * random();

	if (dm > -50)
	{
//		dprint ("level 1\n");
		v = v * 0.7;
	}
	else if (dm > -200)
	{
//		dprint ("level 3\n");
		v = v * 2;
	}
	else
		v = v * 10;

	return v;
};

void(string gibname, float dm) ThrowGib =
{
	local	entity new;

	new = spawn();
	new.origin = self.origin;
	setmodel (new, gibname);
	setsize (new, '0 0 0', '0 0 0');
	new.velocity = VelocityForDamage (dm);
	new.movetype = MOVETYPE_BOUNCE;
	new.solid = SOLID_NOT;
	new.avelocity_x = random()*600;
	new.avelocity_y = random()*600;
	new.avelocity_z = random()*600;
	new.think = SUB_Remove;
	new.ltime = time;
	new.nextthink = time + 10 + random()*10;
	new.frame = 0;
	new.flags = 0;
};

void(string gibname, float dm) ThrowHead =
{
	setmodel (self, gibname);
	self.frame = 0;
	self.nextthink = -1;
	self.movetype = MOVETYPE_BOUNCE;
	self.takedamage = DAMAGE_NO;
	self.solid = SOLID_NOT;
	self.view_ofs = '0 0 8';
	setsize (self, '-16 -16 0', '16 16 56');
	self.velocity = VelocityForDamage (dm);
	self.origin_z = self.origin_z - 24;
	self.flags = self.flags - (self.flags & FL_ONGROUND);
	self.avelocity = crandom() * '0 600 0';
};


void() GibPlayer =
{
	ThrowHead ("progs/h_player.mdl", self.health);
	ThrowGib ("progs/gib1.mdl", self.health);
	ThrowGib ("progs/gib2.mdl", self.health);
	ThrowGib ("progs/gib3.mdl", self.health);

	self.deadflag = DEAD_DEAD;

	if (damage_attacker.classname == "teledeath")
	{
		sound (self, CHAN_VOICE, "player/teledth1.wav", 1, ATTN_NONE);
		return;
	}

	if (damage_attacker.classname == "teledeath2")
	{
		sound (self, CHAN_VOICE, "player/teledth1.wav", 1, ATTN_NONE);
		return;
	}
		
	if (random() < 0.5)
		sound (self, CHAN_VOICE, "player/gib.wav", 1, ATTN_NONE);
	else
		sound (self, CHAN_VOICE, "player/udeath.wav", 1, ATTN_NONE);
};

void() PlayerDie =
{
	local	float	i;
	
	self.items = self.items - (self.items & IT_INVISIBILITY);
	self.invisible_finished = 0;	// don't die as eyes
	self.invincible_finished = 0;
	self.super_damage_finished = 0;
	self.radsuit_finished = 0;
	self.modelindex = modelindex_player;	// don't use eyes

	if (deathmatch || coop)
		DropBackpack();
	
	self.weaponmodel="";
	self.view_ofs = '0 0 -8';
	self.deadflag = DEAD_DYING;
	self.solid = SOLID_NOT;
	self.flags = self.flags - (self.flags & FL_ONGROUND);
	self.movetype = MOVETYPE_TOSS;
	if (self.velocity_z < 10)
		self.velocity_z = self.velocity_z + random()*300;

	if (self.health < -40)
	{
		GibPlayer ();
		return;
	}

	DeathSound();

//	self.spreecount = 0;		//Koolio, spree count reset to 0
//	self.spree = 0;			//Koolio, spree is reset
	
	self.angles_x = 0;
	self.angles_z = 0;
	
	//if (self.weapon == IT_AXE)
	//{
	//	player_die_ax1 ();
	//	return;
	//}
	
	i = cvar("temp1");
	if (!i)
		i = 1 + floor(random()*4);
	
	if (i == 1)
		player_diea1();
	else if (i == 2)
		player_dieb1();
	else
		player_diec1();

};

void() set_suicide_frame =
{	// used by kill command and disconnect command <-- Koolio, fixed typo's =)
	if (self.model != "progs/player.mdl")
		return;	// allready gibbed
	self.frame = $death6;
	self.solid = SOLID_NOT;
	self.movetype = MOVETYPE_TOSS;
	self.deadflag = DEAD_DEAD;
	self.nextthink = -1;
};


void()	player_diea1	=	[	$death1,	player_diea2	] {};
void()	player_diea2	=	[	$death2,	player_diea3	] {};
void()	player_diea3	=	[	$death3,	player_diea4	] {};
void()	player_diea4	=	[	$death4,	player_diea5	] {};
void()	player_diea5	=	[	$death5,	player_diea6	] {};
void()	player_diea6	=	[	$death6,	player_diea6	] {PlayerDead();};

void()	player_dieb1	=	[	$death7,	player_dieb2	] {};
void()	player_dieb2	=	[	$death8,	player_dieb3	] {};
void()	player_dieb3	=	[	$death9,	player_dieb4	] {};
void()	player_dieb4	=	[	$death10,	player_dieb5	] {};
void()	player_dieb5	=	[	$death11,	player_dieb6	] {};
void()	player_dieb6	=	[	$death12,	player_dieb6	] {PlayerDead();};

void()	player_diec1	=	[	$death13,	player_diec2	] {};
void()	player_diec2	=	[	$death14,	player_diec3	] {};
void()	player_diec3	=	[	$death15,	player_diec4	] {};
void()	player_diec4	=	[	$death16,	player_diec5	] {};
void()	player_diec5	=	[	$death17,	player_diec6	] {};
void()	player_diec6	=	[	$death18,	player_diec7	] {};
void()	player_diec7	=	[	$death19,	player_diec8	] {};
void()	player_diec8	=	[	$death20,	player_diec8	] {PlayerDead();};

//============================================================================
//		Player Taunts, Flipoffs etc
//============================================================================

// Flipoff
void() 	player_flipoff1		=	[	$flip1, player_flipoff2		] {};	
void() 	player_flipoff2		=	[	$flip2, player_flipoff3		] {};	
void() 	player_flipoff3		=	[	$flip3, player_flipoff4		] {};	
void() 	player_flipoff4		=	[	$flip4, player_flipoff5		] {};	
void() 	player_flipoff5		=	[	$flip5, player_flipoff6		] {};	
void() 	player_flipoff6		=	[	$flip6, player_flipoff7		] {};	
void() 	player_flipoff7		=	[	$flip7, player_flipoff8		] {};	
void() 	player_flipoff8		=	[	$flip8, player_flipoff9		] {};	
void() 	player_flipoff9		=	[	$flip9, player_flipoff10	] {};	
void() 	player_flipoff10		=	[	$flip10, player_flipoff11	] {};	
void() 	player_flipoff11		=	[	$flip11, player_flipoff12	] {};	
void() 	player_flipoff12		=	[	$flip12, player_run		] {};	

// Salute
void() 	player_salute1		=	[	$salute1, player_salute2		] {};	
void() 	player_salute2		=	[	$salute2, player_salute3		] {};	
void() 	player_salute3		=	[	$salute3, player_salute4		] {};	
void() 	player_salute4		=	[	$salute4, player_salute5		] {};	
void() 	player_salute5		=	[	$salute5, player_salute6		] {};	
void() 	player_salute6		=	[	$salute6, player_salute7		] {};	
void() 	player_salute7		=	[	$salute7, player_salute8		] {};	
void() 	player_salute8		=	[	$salute8, player_salute9		] {};	
void() 	player_salute9		=	[	$salute9, player_salute10		] {};	
void() 	player_salute10		=	[	$salute10, player_salute11	] {};	
void() 	player_salute11		=	[	$salute11, player_run		] {};	

// Taunt
void() 	player_taunt1		=	[	$taunt1, player_taunt2		] {};	
void() 	player_taunt2		=	[	$taunt2, player_taunt3		] {};	
void() 	player_taunt3		=	[	$taunt3, player_taunt4		] {};	
void() 	player_taunt4		=	[	$taunt4, player_taunt5		] {};	
void() 	player_taunt5		=	[	$taunt5, player_taunt6		] {};	
void() 	player_taunt6		=	[	$taunt6, player_taunt7		] {};	
void() 	player_taunt7		=	[	$taunt7, player_taunt8		] {};	
void() 	player_taunt8		=	[	$taunt8, player_taunt9		] {};	
void() 	player_taunt9		=	[	$taunt9, player_taunt10		] {};	
void() 	player_taunt10		=	[	$taunt10, player_taunt11		] {};	
void() 	player_taunt11		=	[	$taunt11, player_taunt12		] {};	
void() 	player_taunt12		=	[	$taunt12, player_taunt13		] {};	
void() 	player_taunt13		=	[	$taunt13, player_taunt14		] {};	
void() 	player_taunt14		=	[	$taunt14, player_taunt15		] {};	
void() 	player_taunt15		=	[	$taunt15, player_taunt16		] {};	
void() 	player_taunt16		=	[	$taunt16, player_taunt17		] {};	
void() 	player_taunt17		=	[	$taunt17, player_run		] {};	

// Wave
void() 	player_wave1		=	[	$wave1, player_wave2		] {};	
void() 	player_wave2		=	[	$wave2, player_wave3		] {};	
void() 	player_wave3		=	[	$wave3, player_wave4		] {};	
void() 	player_wave4		=	[	$wave4, player_wave5		] {};	
void() 	player_wave5		=	[	$wave5, player_wave6		] {};	
void() 	player_wave6		=	[	$wave6, player_wave7		] {};	
void() 	player_wave7		=	[	$wave7, player_wave8		] {};	
void() 	player_wave8		=	[	$wave8, player_wave9		] {};	
void() 	player_wave9		=	[	$wave9, player_wave10		] {};	
void() 	player_wave10		=	[	$wave10, player_wave11	] {};	
void() 	player_wave11		=	[	$wave11, player_run		] {};	

// Point
void() 	player_point1		=	[	$point1, player_point2		] {};	
void() 	player_point2		=	[	$point2, player_point3		] {};	
void() 	player_point3		=	[	$point3, player_point4		] {};	
void() 	player_point4		=	[	$point4, player_point5		] {};	
void() 	player_point5		=	[	$point5, player_point6		] {};	
void() 	player_point6		=	[	$point6, player_point7		] {};	
void() 	player_point7		=	[	$point7, player_point8		] {};	
void() 	player_point8		=	[	$point8, player_point9		] {};	
void() 	player_point9		=	[	$point9, player_point10		] {};	
void() 	player_point10		=	[	$point10, player_point11		] {};	
void() 	player_point11		=	[	$point11, player_point12		] {};	
void() 	player_point12		=	[	$point11, player_run		] {};	

//============================================================================
//		Player Jumping and Landing
//============================================================================

void()	player_jump1		=     [    $jump1, player_jump2		] {};
void()	player_jump2		=     [    $jump1, player_jump3		] {};
void()	player_jump3		=     [    $jump2, player_jump4		] {};
void()	player_jump4		=     [    $jump2, player_jump5		] {};
void()	player_jump5		=     [    $jump3, player_jump6		] {};
void()	player_jump6		=     [    $jump3, player_jump6		]
{if ((self.jump_flag < -100) && (self.flags & FL_ONGROUND) && (self.health > 0)) player_run();
}; //Not really used right now, tut5 will deal with this

void()	player_land1		=     [    $jump4, player_land2		] {};
void()	player_land2		=     [    $jump5, player_land3		] {};
void()	player_land3		=     [    $jump6, player_run			] {};