Fix can't reload partial mag with flares in inventory

Vanilla development commits:

7f7d3e02e7

094f1f18d2

a078e84f11

805b9def10

Also reverted:
51be8aa8a5
since it was not the cause.

See https://github.com/DayZMod/DayZ/issues/641 for the details.
This commit is contained in:
ebaydayz
2016-07-18 21:43:08 -04:00
parent 2f4815cb39
commit 2911bffced
3 changed files with 97 additions and 68 deletions

View File

@@ -1,37 +1,67 @@
class Throw : GrenadeLauncher
{
autoReload = true;
backgroundReload = true;
/*
scope = public;
autoAimEnabled = false;
cursor = "Vehicle_Grenade_W";
cursoraim = "\ca\Weapons\Data\clear_empty";
cursorSize = 1;
value = 0;
type = VSoft;
displayName = $STR_MAG_ACTION2_4;
canDrop = false;
//autoReload = true;
//backgroundReload = true;
*/
muzzles[] =
{
HandGrenadeMuzzle,
SmokeShellMuzzle,
RoadFlareMuzzle,
ChemLightMuzzle,
TrashMuzzle
"HandGrenadeMuzzle",
"SmokeShellMuzzle",
"RoadFlareMuzzle",
"ChemLightMuzzle",
"TrashMuzzle"
};
class ThrowMuzzle : GrenadeLauncher
{
/*
cursoraim = "Vehicle_Grenade_W";
cursorSize = 1;
sound[] = {"", 0.000316228, 1};
reloadSound[] = {"", 0.000316228, 1};
aiDispersionCoefX = 6;
aiDispersionCoefY = 6;
reloadTime = 0;
magazineReloadTime = 0;
enableAttack = false;
showEmpty = 0;
autoReload = true;
modelOptics = "";
minRange = 30;
minRangeProbab = 0.5;
midRange = 45;
midRangeProbab = 0.2;
maxRange = 60;
maxRangeProbab = 0.03;
*/
cursor = "\ca\Weapons\Data\clear_empty";
backgroundReload = true;
//backgroundReload = true;
};
class RoadFlareMuzzle : ThrowMuzzle
{
displayName = $STR_MAG_ACTION_4;
magazines[] = {HandRoadFlare};
magazines[] = {"HandRoadFlare"};
begin1[] = {"dayz_weapons\sounds\roadflare_start", 1.77828, 1, 1000};
soundBegin[] = {begin1, 1};
soundBegin[] = {"begin1", 1};
};
class ChemLightMuzzle : ThrowMuzzle
{
displayName = $STR_MAG_ACTION_5;
magazines[] = {HandChemGreen, HandChemRed, HandChemBlue};
magazines[] = {"HandChemGreen", "HandChemRed", "HandChemBlue"};
};
class TrashMuzzle : ThrowMuzzle
@@ -39,51 +69,49 @@ class Throw : GrenadeLauncher
displayName = $STR_ACTION_THROW;
magazines[] =
{
TrashJackDaniels,
TrashTinCan,
FoodCanGriffEmpty,
FoodCanBadguyEmpty,
FoodCanBoneboyEmpty,
FoodCanCornEmpty,
FoodCanCurgonEmpty,
FoodCanDemonEmpty,
FoodCanFraggleosEmpty,
FoodCanHerpyEmpty,
FoodCanDerpyEmpty,
FoodCanOrlokEmpty,
FoodCanPowellEmpty,
FoodCanTylersEmpty,
FoodCanUnlabeledEmpty,
FoodCanRusUnlabeledEmpty,
FoodCanRusPorkEmpty,
FoodCanRusPeasEmpty,
FoodCanRusMilkEmpty,
FoodCanRusCornEmpty,
FoodCanRusStewEmpty,
FoodCanBeefEmpty,
FoodCanPotatoesEmpty,
ItemSodaEmpty,
ItemSodaClaysEmpty,
ItemSodaCokeEmpty,
ItemSodaDrwasteEmpty,
ItemSodaFrankaEmpty,
ItemSodaGrapeDrinkEmpty,
ItemSodaLemonadeEmpty,
ItemSodaLirikEmpty,
ItemSodaLvgEmpty,
ItemSodaMdewEmpty,
ItemSodaMtngreenEmpty,
ItemSodaMzlyEmpty,
ItemSodaPeppsyEmpty,
ItemSodaPepsiEmpty,
ItemSodaR4z0rEmpty,
ItemSodaRabbitEmpty,
ItemSodaRocketFuelEmpty,
ItemSodaSacriteEmpty,
ItemSodaSherbetEmpty,
ItemSodaSmashtEmpty
"TrashJackDaniels",
"TrashTinCan",
"FoodCanGriffEmpty",
"FoodCanBadguyEmpty",
"FoodCanBoneboyEmpty",
"FoodCanCornEmpty",
"FoodCanCurgonEmpty",
"FoodCanDemonEmpty",
"FoodCanFraggleosEmpty",
"FoodCanHerpyEmpty",
"FoodCanDerpyEmpty",
"FoodCanOrlokEmpty",
"FoodCanPowellEmpty",
"FoodCanTylersEmpty",
"FoodCanUnlabeledEmpty",
"FoodCanRusUnlabeledEmpty",
"FoodCanRusPorkEmpty",
"FoodCanRusPeasEmpty",
"FoodCanRusMilkEmpty",
"FoodCanRusCornEmpty",
"FoodCanRusStewEmpty",
"FoodCanBeefEmpty",
"FoodCanPotatoesEmpty",
"ItemSodaEmpty",
"ItemSodaClaysEmpty",
"ItemSodaCokeEmpty",
"ItemSodaDrwasteEmpty",
"ItemSodaFrankaEmpty",
"ItemSodaGrapeDrinkEmpty",
"ItemSodaLemonadeEmpty",
"ItemSodaLirikEmpty",
"ItemSodaLvgEmpty",
"ItemSodaMdewEmpty",
"ItemSodaMtngreenEmpty",
"ItemSodaMzlyEmpty",
"ItemSodaPeppsyEmpty",
"ItemSodaPepsiEmpty",
"ItemSodaR4z0rEmpty",
"ItemSodaRabbitEmpty",
"ItemSodaRocketFuelEmpty",
"ItemSodaSacriteEmpty",
"ItemSodaSherbetEmpty",
"ItemSodaSmashtEmpty"
};
};
};