mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Fix can't reload partial mag with flares in inventory
Vanilla development commits:7f7d3e02e7094f1f18d2a078e84f11805b9def10Also reverted:51be8aa8a5since it was not the cause. See https://github.com/DayZMod/DayZ/issues/641 for the details.
This commit is contained in:
@@ -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
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class CfgAmmo
|
class CfgAmmo
|
||||||
{
|
{
|
||||||
class Default;
|
class Default;
|
||||||
class BulletBase;
|
class BulletBase;
|
||||||
@@ -6,7 +6,7 @@ class CfgAmmo
|
|||||||
class GrenadeCore;
|
class GrenadeCore;
|
||||||
|
|
||||||
/* MELEE */
|
/* MELEE */
|
||||||
|
|
||||||
class Melee : Default
|
class Melee : Default
|
||||||
{
|
{
|
||||||
//Simulation
|
//Simulation
|
||||||
@@ -306,7 +306,7 @@ class CfgAmmo
|
|||||||
|
|
||||||
|
|
||||||
/* BULLET */
|
/* BULLET */
|
||||||
|
|
||||||
//.44 Henry Winchester 1866
|
//.44 Henry Winchester 1866
|
||||||
class B_1866_Slug : BulletBase
|
class B_1866_Slug : BulletBase
|
||||||
{
|
{
|
||||||
@@ -321,9 +321,9 @@ class CfgAmmo
|
|||||||
airFriction = -0.005;
|
airFriction = -0.005;
|
||||||
caliber = 0.5;
|
caliber = 0.5;
|
||||||
};
|
};
|
||||||
|
|
||||||
//makarov
|
//makarov
|
||||||
class B_9x18_Ball : BulletBase
|
class B_9x18_Ball : BulletBase
|
||||||
{
|
{
|
||||||
airfriction = -0.002751;
|
airfriction = -0.002751;
|
||||||
audiblefire = 15;
|
audiblefire = 15;
|
||||||
@@ -334,9 +334,9 @@ class CfgAmmo
|
|||||||
typicalspeed = 350;
|
typicalspeed = 350;
|
||||||
visiblefire = 15;
|
visiblefire = 15;
|
||||||
};
|
};
|
||||||
|
|
||||||
//makarov sd
|
//makarov sd
|
||||||
class B_9x18_SD : B_9x18_Ball
|
class B_9x18_SD : B_9x18_Ball
|
||||||
{
|
{
|
||||||
airfriction = -0.001893;
|
airfriction = -0.001893;
|
||||||
audiblefire = 0.035;
|
audiblefire = 0.035;
|
||||||
@@ -346,9 +346,9 @@ class CfgAmmo
|
|||||||
visiblefire = 0.035;
|
visiblefire = 0.035;
|
||||||
visiblefiretime = 2;
|
visiblefiretime = 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
//M1911
|
//M1911
|
||||||
class B_45ACP_Ball : BulletBase
|
class B_45ACP_Ball : BulletBase
|
||||||
{
|
{
|
||||||
airfriction = -0.0013522;
|
airfriction = -0.0013522;
|
||||||
audiblefire = 16;
|
audiblefire = 16;
|
||||||
@@ -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;
|
||||||
@@ -483,7 +484,7 @@ class CfgAmmo
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// used for grenade traps
|
// used for grenade traps
|
||||||
class GrenadeHandTimedWest;
|
class GrenadeHandTimedWest;
|
||||||
class GrenadeHandTimedWest_DZ : GrenadeHandTimedWest
|
class GrenadeHandTimedWest_DZ : GrenadeHandTimedWest
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ if (isNil "keyboard_keys") then {
|
|||||||
};
|
};
|
||||||
} forEach getArray(configFile >> "cfgWeapons" >> _weapon >> _muzz >> "magazines");
|
} forEach getArray(configFile >> "cfgWeapons" >> _weapon >> _muzz >> "magazines");
|
||||||
} forEach _muzzles;
|
} forEach _muzzles;
|
||||||
} forEach [ "Throw"];
|
} forEach ["Throw"];
|
||||||
|
|
||||||
_magCount = count _ammo_throwable;
|
_magCount = count _ammo_throwable;
|
||||||
if (_magCount > 0) then {
|
if (_magCount > 0) then {
|
||||||
|
|||||||
Reference in New Issue
Block a user