g_spawn.c is
the file you want... here's code to take out the BFG & BFG Ammo
(for my BFGTag Mod)
qboolean G_CallSpawn( gentity_t *ent ) {
spawn_t
*s;
gitem_t *item;
if ( !ent->classname ) {
G_Printf ("G_CallSpawn: NULL
classname\n");
return qfalse;
}
// check item spawn functions
for ( item=bg_itemlist+1 ;
item->classname ; item++ ) {
if ( !strcmp(item->classname,
ent->classname) ) {
// found it
if( item->giType ==
IT_TEAM && g_gametype.integer != GT_CTF ) {
return
qfalse;
}
if ( item->giTag == WP_BFG ) // No BFG Or
Ammo
{
return qfalse;
}
G_SpawnItem( ent, item
);
return qtrue;
}
}
// check normal spawn functions
for ( s=spawns ; s->name ;
s++ ) {
if ( !strcmp(s->name, ent->classname) ) {
//
found it
s->spawn(ent);
return qtrue;
}
}
G_Printf
("%s doesn't have a spawn function\n", ent->classname);
return
qfalse;
}
------------------
-= Jazz =-