Artificial intelligence is over-rated. I can live without smart deathmatch opponents. But life just isn't any fun unless you have gibbable corpses.
If you agree, then open up the file deemed tutor.qc. Scroll down to the subroutine th_respawn(), which is after the animation sequence bot_light1(). Change the routine to look like this:
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~ void() th_respawn = // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ { self.think = respawn_bot; self.nextthink = time + 2; create_gibbable_corpse(); };To create a gibbable corpse, we don't have to screw with the bot at all. All we need to do is make a copy of his body when he gets smoked.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~ void() create_gibbable_corpse = // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ { local entity corpse; corpse = spawn(); corpse.origin = self.origin; corpse.flags = FL_ITEM; corpse.solid = SOLID_BBOX; corpse.touch = gib_corpse; corpse.takedamage = DAMAGE_AIM; corpse.th_die = gib_corpse; setsize (corpse, VEC_HULL_MIN, VEC_HULL_MAX); setmodel (corpse, self.model); corpse.frame = self.frame; corpse.angles = self.angles; corpse.skin = self.skin; corpse.colormap = self.colormap; corpse.think = SUB_Remove; corpse.nextthink = time + 6; };Here we create an entity that looks and smells just like the bot. This entity will just lay on the ground until someone touches it or shoots it. Then its die function will happen. Where is its die function, you ask? Uh, right here. Paste this before the previous:
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~ void() gib_corpse = // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ { local float vel; self.nextthink = time; setmodel (self, string_null); vel = random() * 200; ThrowGib ("progs/gib1.mdl", vel); vel = random() * 200; ThrowGib ("progs/gib2.mdl", vel); vel = random() * 200; ThrowGib ("progs/gib3.mdl", vel); remove(self); };Splat! The body blows up in gibs when this happens. If no one shoots it, the corpse will just remove itself.