.float boom;
void() BecomeExplosion;
vector(float dm) VelocityForDamage;
void(string gibname, float dm) ThrowHead;

//Thunderwalker boom code

void() makeboom=
{

        T_RadiusDamage (self, self.owner, 95, world);
        
	WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
	WriteByte (MSG_BROADCAST, TE_EXPLOSION);
	WriteCoord (MSG_BROADCAST, self.origin_x);
	WriteCoord (MSG_BROADCAST, self.origin_y);
	WriteCoord (MSG_BROADCAST, self.origin_z);

	BecomeExplosion ();
};

// thunderWalker: just the id gib code snarked for our use

void(string gibname, float dm) boomer=
{
        local   entity new;
        
        new = spawn();
        new.origin = self.origin;
	new.owner = self;   
        setmodel (new, "progs/gib3.mdl");
        setsize (new, '0 0 0', '0 0 0');
        new.velocity = VelocityForDamage (dm);   
        new.movetype = MOVETYPE_BOUNCE;
        new.solid = SOLID_BBOX;
        new.avelocity_x = random()*600;
        new.avelocity_y = random()*600;
        new.avelocity_z = random()*600;
        new.think = makeboom;
        new.ltime = time;
        new.nextthink = time + 1 + random()*3;
        new.frame = 0;
        new.flags = 0; 
};

void() rittierodt=
{
ThrowHead("progs/h_player.mdl", self.health);
boomer("progs/gib3.mdl", self.health);
boomer("progs/gib3.mdl", self.health);
boomer("progs/gib3.mdl", self.health);
boomer("progs/gib3.mdl", self.health);
boomer("progs/gib3.mdl", self.health);
boomer("progs/gib3.mdl", self.health);

self.deadflag = DEAD_DEAD;
};

.float times;

void() hayden=
{
local float dam;
dam = 90 + self.ammo_rockets;
self.ammo_rockets = 0;

T_RadiusDamage (self, self, dam, world);

self.killing = 1;
self.times = 5;


self.health = -50;
self.frags = self.frags - 2;
PlayerDie();

};
