set g_shootfromcenter 0 "weapon gets moved to the center, shots still come from the barrel of your weapon; visual gun position can still be influenced by cl_gunalign 1 and 2"
set g_shootfromfixedorigin "" "if set to a string like 0 y z, the gun is moved to the given y and z coordinates. If set to a string like x y z, the whole shot origin is used"
set g_pinata 0 "if set to 1 you will not only drop your current weapon when you are killed, but you will drop all weapons that you possessed"
-set g_weapon_stay 0 "if set to 1 or 2, weapons stay after they were picked up (1: weapons you don't have yet give you ammo of their type and they can not be dropped, 2: weapons don't give ammo, but instead players start with one pickup-load of ammo by default, 3: weapons give ammo, weapons only stay as ammo-less ghosts)"
+set g_weapon_stay 0 "1: ghost weapons can be picked up too but give no ammo"
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"
me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_pinata", _("PiƱata")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBoxEx(2, 0, "g_weapon_stay", _("Weapons stay")));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_weapon_stay", _("Weapons stay")));
me.TR(me);
me.gotoRC(me, 0, 2); me.setFirstColumn(me, me.currentColumn);
return;
if(!autocvar_g_weapon_throwable)
return;
- if(autocvar_g_weapon_stay == 1)
- return;
if(self.weaponentity.state != WS_READY)
return;
if(!W_IsWeaponThrowable(w))
if (g_jetpack)
start_items |= IT_JETPACK;
- if (g_weapon_stay == 2)
- {
- if (!start_ammo_shells) start_ammo_shells = g_pickup_shells;
- if (!start_ammo_nails) start_ammo_nails = g_pickup_nails;
- if (!start_ammo_cells) start_ammo_cells = g_pickup_cells;
- if (!start_ammo_rockets) start_ammo_rockets = g_pickup_rockets;
- if (!start_ammo_fuel) start_ammo_fuel = g_pickup_fuel;
- if (!warmup_start_ammo_shells) warmup_start_ammo_shells = g_pickup_shells;
- if (!warmup_start_ammo_nails) warmup_start_ammo_nails = g_pickup_nails;
- if (!warmup_start_ammo_cells) warmup_start_ammo_cells = g_pickup_cells;
- if (!warmup_start_ammo_rockets) warmup_start_ammo_rockets = g_pickup_rockets;
- if (!warmup_start_ammo_fuel) warmup_start_ammo_fuel = g_pickup_fuel;
- }
-
MUTATOR_CALLHOOK(SetStartItems);
for (i = WEP_FIRST; i <= WEP_LAST; ++i)
e.spawnshieldtime = 1;
}
- else if((e.flags & FL_WEAPON) && (g_weapon_stay == 3))
+ else if((e.flags & FL_WEAPON) && g_weapon_stay)
{
// make the item translucent and not touchable
e.model = e.mdl;
}
else
{
- if (g_weapon_stay == 1)
- if not(item.flags & FL_NO_WEAPON_STAY)
- if (item.flags & FL_WEAPON)
- {
- if(item.classname == "droppedweapon")
- {
- if (player.weapons & item.weapons) // don't let players stack ammo by tossing weapons
- goto skip;
- }
- else
- {
- if (player.weapons & item.weapons)
- goto skip;
- }
- }
-
// in case the player has autoswitch enabled do the following:
// if the player is using their best weapon before items are given, they
// probably want to switch to an even better weapon after items are given
}
if (item.flags & FL_WEAPON)
- if ((it = item.weapons - (item.weapons & player.weapons)) || (g_pickup_weapons_anyway && g_weapon_stay == 0))
+ if ((it = item.weapons - (item.weapons & player.weapons)) || (g_pickup_weapons_anyway))
{
pickedup = TRUE;
for(i = WEP_FIRST; i <= WEP_LAST; ++i)
remove (self);
else if not(self.spawnshieldtime)
return;
- else if((self.flags & FL_WEAPON) && !(self.flags & FL_NO_WEAPON_STAY) && (g_weapon_stay == 1 || g_weapon_stay == 2))
- return;
else
{
if(self.team)
if(player.weapons & item.weapons == item.weapons)
{
// If I can pick it up
- if(g_weapon_stay == 1 || g_weapon_stay == 2 || !item.spawnshieldtime)
+ if(!item.spawnshieldtime)
c = 0;
else if(player.ammo_cells || player.ammo_shells || player.ammo_nails || player.ammo_rockets)
{
if(self.team)
self.flags |= FL_NO_WEAPON_STAY;
- if(g_weapon_stay == 2 && self.classname != "droppedweapon")
- {
- self.ammo_shells = 0;
- self.ammo_nails = 0;
- self.ammo_cells = 0;
- self.ammo_rockets = 0;
- // weapon stay 2: don't use ammo on weapon pickups; instead
- // initialize all ammo types to the pickup ammo unless set by g_start_ammo_*
- }
-
StartItem(e.model, "weapons/weaponpickup.wav", self.respawntime, self.respawntimejitter, e.message, 0, e.weapons, FL_WEAPON, weapon_pickupevalfunc, e.bot_pickupbasevalue);
if (self.modelindex) // don't precache if self was removed
weapon_action(e.weapon, WR_PRECACHE);