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 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[] = muzzles[] =
{ {
HandGrenadeMuzzle, "HandGrenadeMuzzle",
SmokeShellMuzzle, "SmokeShellMuzzle",
"RoadFlareMuzzle",
RoadFlareMuzzle, "ChemLightMuzzle",
ChemLightMuzzle, "TrashMuzzle"
TrashMuzzle
}; };
class ThrowMuzzle : GrenadeLauncher 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"; cursor = "\ca\Weapons\Data\clear_empty";
backgroundReload = true; //backgroundReload = true;
}; };
class RoadFlareMuzzle : ThrowMuzzle class RoadFlareMuzzle : ThrowMuzzle
{ {
displayName = $STR_MAG_ACTION_4; displayName = $STR_MAG_ACTION_4;
magazines[] = {HandRoadFlare}; magazines[] = {"HandRoadFlare"};
begin1[] = {"dayz_weapons\sounds\roadflare_start", 1.77828, 1, 1000}; begin1[] = {"dayz_weapons\sounds\roadflare_start", 1.77828, 1, 1000};
soundBegin[] = {begin1, 1}; soundBegin[] = {"begin1", 1};
}; };
class ChemLightMuzzle : ThrowMuzzle class ChemLightMuzzle : ThrowMuzzle
{ {
displayName = $STR_MAG_ACTION_5; displayName = $STR_MAG_ACTION_5;
magazines[] = {HandChemGreen, HandChemRed, HandChemBlue}; magazines[] = {"HandChemGreen", "HandChemRed", "HandChemBlue"};
}; };
class TrashMuzzle : ThrowMuzzle class TrashMuzzle : ThrowMuzzle
@@ -39,51 +69,49 @@ class Throw : GrenadeLauncher
displayName = $STR_ACTION_THROW; displayName = $STR_ACTION_THROW;
magazines[] = magazines[] =
{ {
TrashJackDaniels, "TrashJackDaniels",
"TrashTinCan",
TrashTinCan, "FoodCanGriffEmpty",
FoodCanGriffEmpty, "FoodCanBadguyEmpty",
FoodCanBadguyEmpty, "FoodCanBoneboyEmpty",
FoodCanBoneboyEmpty, "FoodCanCornEmpty",
FoodCanCornEmpty, "FoodCanCurgonEmpty",
FoodCanCurgonEmpty, "FoodCanDemonEmpty",
FoodCanDemonEmpty, "FoodCanFraggleosEmpty",
FoodCanFraggleosEmpty, "FoodCanHerpyEmpty",
FoodCanHerpyEmpty, "FoodCanDerpyEmpty",
FoodCanDerpyEmpty, "FoodCanOrlokEmpty",
FoodCanOrlokEmpty, "FoodCanPowellEmpty",
FoodCanPowellEmpty, "FoodCanTylersEmpty",
FoodCanTylersEmpty, "FoodCanUnlabeledEmpty",
FoodCanUnlabeledEmpty, "FoodCanRusUnlabeledEmpty",
FoodCanRusUnlabeledEmpty, "FoodCanRusPorkEmpty",
FoodCanRusPorkEmpty, "FoodCanRusPeasEmpty",
FoodCanRusPeasEmpty, "FoodCanRusMilkEmpty",
FoodCanRusMilkEmpty, "FoodCanRusCornEmpty",
FoodCanRusCornEmpty, "FoodCanRusStewEmpty",
FoodCanRusStewEmpty, "FoodCanBeefEmpty",
FoodCanBeefEmpty, "FoodCanPotatoesEmpty",
FoodCanPotatoesEmpty, "ItemSodaEmpty",
"ItemSodaClaysEmpty",
ItemSodaEmpty, "ItemSodaCokeEmpty",
ItemSodaClaysEmpty, "ItemSodaDrwasteEmpty",
ItemSodaCokeEmpty, "ItemSodaFrankaEmpty",
ItemSodaDrwasteEmpty, "ItemSodaGrapeDrinkEmpty",
ItemSodaFrankaEmpty, "ItemSodaLemonadeEmpty",
ItemSodaGrapeDrinkEmpty, "ItemSodaLirikEmpty",
ItemSodaLemonadeEmpty, "ItemSodaLvgEmpty",
ItemSodaLirikEmpty, "ItemSodaMdewEmpty",
ItemSodaLvgEmpty, "ItemSodaMtngreenEmpty",
ItemSodaMdewEmpty, "ItemSodaMzlyEmpty",
ItemSodaMtngreenEmpty, "ItemSodaPeppsyEmpty",
ItemSodaMzlyEmpty, "ItemSodaPepsiEmpty",
ItemSodaPeppsyEmpty, "ItemSodaR4z0rEmpty",
ItemSodaPepsiEmpty, "ItemSodaRabbitEmpty",
ItemSodaR4z0rEmpty, "ItemSodaRocketFuelEmpty",
ItemSodaRabbitEmpty, "ItemSodaSacriteEmpty",
ItemSodaRocketFuelEmpty, "ItemSodaSherbetEmpty",
ItemSodaSacriteEmpty, "ItemSodaSmashtEmpty"
ItemSodaSherbetEmpty,
ItemSodaSmashtEmpty
}; };
}; };
}; };

View File

@@ -438,6 +438,7 @@ class CfgAmmo
simulationStep = 1; simulationStep = 1;
soundFly[] = {"dayz_weapons\sounds\roadflare", 0.316228, 1, 60}; soundFly[] = {"dayz_weapons\sounds\roadflare", 0.316228, 1, 60};
cost = 100; cost = 100;
explosive = false;
deflecting = 60; deflecting = 60;
explosionTime = 0; explosionTime = 0;
timeToLive = 300; timeToLive = 300;