set g_invasion_spawnpoint_spawn_delay 0.5
set g_invasion_teams 0 "number of teams in invasion (note: use mapinfo to set this)"
set g_invasion_team_spawns 1 "use team spawns in teamplay invasion mode"
+
+// ==============
+// Single Player
+// ==============
+set g_sp_allow_bot_pickup 0 "Whether bots should be allowed to pick up items"
.entity sp_spawn_spot;
.bool can_respawn;
+bool autocvar_g_sp_allow_bot_pickup;
+
int sp_bot_number;
/*QUAKED spawnfunc_tdm_team (0 .5 .8) (-16 -16 -24) (16 16 32)
this.cnt = teamcolor - 1;
this.team = teamcolor;
this.spawnfunc_checked = true;
- //spawnfunc_sp_team(this);
}
// spawnfuncs
if ( IS_BOT_CLIENT(player) && !player.sp_spawn_spot )
bot_remove(player);
}
+
+MUTATOR_HOOKFUNCTION(sp, ItemTouch)
+{
+ entity toucher = M_ARGV(1, entity);
+ if ( IS_BOT_CLIENT(toucher) && !autocvar_g_sp_allow_bot_pickup )
+ return MUT_ITEMTOUCH_RETURN;
+ return MUT_ITEMTOUCH_CONTINUE;
+}
+
+MUTATOR_HOOKFUNCTION(sp, Item_Spawn)
+{
+ entity item = M_ARGV(0, entity);
+ if ( !autocvar_g_sp_allow_bot_pickup )
+ {
+ item.bot_pickup = false;
+ }
+ return false;
+}