Nevertheless, SG can be changed to add these attributes to items:
In game/g_items.c in void G_SpawnItem(gentity_t, gitem_t), add
- Code: Select all
int i=0;
G_SpawnInt( "nobots", "0", &i);
if ( i ) {
ent->flags |= FL_NO_BOTS;
}
G_SpawnInt( "nohumans", "0", &i );
if ( i ) {
ent->flags |= FL_NO_HUMANS;
}
In game/bg_misc.c in qboolean BG_CanItemBeGrabbed(int, const entityState_t, const playerState_t), add
- Code: Select all
gentity_t *item_ent;
gentity_t *player_ent;
item_ent = &g_entities[ ent->number ];
player_ent = &g_entities[ ps->clientNum ];
if ( ( item_ent->flags & FL_NO_BOTS ) && ( player_ent->r.svFlags & SVF_BOT ) ) {
return qfalse;
}
// just to be symmetric, we have a nohumans option...
if ( ( item_ent->flags & FL_NO_HUMANS ) && !( player_ent->r.svFlags & SVF_BOT ) ) {
return qfalse;
}