set g_weapon_throwable 1 "if set to 1, weapons can be dropped"
set g_powerups -1 "if set to 0 the strength and shield (invincibility) will not spawn on the map, if 1 they will spawn in all game modes, -1 is game mode default"
set g_use_ammunition 1 "if set to 0 all weapons have unlimited ammunition"
-set g_pickup_items 1 "if set to 0 all items (health, armor, ammo, weapons...) are removed from the map"
+set g_pickup_items -1 "if set to 0 all items (health, armor, ammo, weapons...) are removed from the map, if 1 they are forced to spawn"
set g_minstagib 0 "enable minstagib"
set g_minstagib_extralives 2 "how many extra lives you will get per powerup"
set g_minstagib_ammo_start 10 "starting ammo"
float autocvar_g_arena_maxspawned;
float autocvar_g_arena_point_leadlimit;
float autocvar_g_arena_point_limit;
-float autocvar_g_arena_powerups;
float autocvar_g_arena_roundbased;
float autocvar_g_arena_warmup;
float autocvar_g_assault;
s = strcat(s, ":no_use_ammunition");
// initialiation stuff, not good in the mutator system
- if(!autocvar_g_pickup_items)
+ if(autocvar_g_pickup_items == 0)
s = strcat(s, ":no_pickup_items");
+ if(autocvar_g_pickup_items > 0)
+ s = strcat(s, ":pickup_items");
// initialiation stuff, not good in the mutator system
if(autocvar_g_weaponarena != "0")
+float have_pickup_item(void)
+{
+ // minstagib: only allow filtered items
+ if(g_minstagib)
+ if(self.classname != "minstagib")
+ return FALSE;
+
+ if(self.items == IT_STRENGTH || self.items == IT_INVINCIBLE)
+ {
+ if(autocvar_g_powerups > 0)
+ return TRUE;
+ if(autocvar_g_powerups == 0)
+ return FALSE;
+ if(g_arena)
+ return FALSE;
+ }
+ else
+ {
+ if(autocvar_g_pickup_items > 0)
+ return TRUE;
+ if(autocvar_g_pickup_items == 0)
+ return FALSE;
+ if(g_lms)
+ return FALSE;
+ if(g_ca)
+ return FALSE;
+ if(g_weaponarena)
+ if((self.weapons & WEPBIT_ALL) || (self.items & IT_AMMO))
+ return FALSE;
+ }
+ return TRUE;
+}
+
#define ITEM_RESPAWN_TICKS 10
#define ITEM_RESPAWNTIME(i) ((i).respawntime + crandom() * (i).respawntimejitter)
return;
}
+ if(!have_pickup_item())
+ {
+ startitem_failed = TRUE;
+ remove (self);
+ return;
+ }
+
self.reset = Item_Reset;
// it's a level item
if(self.spawnflags & 1)
}
*/
- if(g_lms || g_ca)
- {
- startitem_failed = TRUE;
- remove(self);
- return;
- }
- else if (g_weaponarena && ((weaponid & WEPBIT_ALL) || (itemid & IT_AMMO)))
- {
- startitem_failed = TRUE;
- remove(self);
- return;
- }
- else if (g_minstagib)
- {
- // don't remove dropped items and powerups
- if (self.classname != "minstagib")
- {
- startitem_failed = TRUE;
- remove (self);
- return;
- }
- }
- else if (!autocvar_g_pickup_items && itemid != IT_STRENGTH && itemid != IT_INVINCIBLE)
- {
- startitem_failed = TRUE;
- remove (self);
- return;
- }
-
if(autocvar_spawn_debug >= 2)
{
entity otheritem;
void spawnfunc_item_health25() { spawnfunc_item_health_medium(); }
void spawnfunc_item_health100() { spawnfunc_item_health_mega(); }
-float have_powerups(void)
-{
- if(autocvar_g_powerups > 0)
- return TRUE;
- else if(autocvar_g_powerups == 0)
- return FALSE;
- else if(g_arena)
- return FALSE;
- else
- return TRUE;
-}
-
void spawnfunc_item_strength (void) {
- if(!have_powerups())
- return;
-
if(g_minstagib) {
minstagib_items(IT_STRENGTH);
} else {
}
void spawnfunc_item_invincible (void) {
- if(!have_powerups())
- return;
-
if(g_minstagib) {
minstagib_items(IT_INVINCIBLE);
} else {