mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Merge pull request #1420 from ebaydayz/patch-1
Fix undefined variable "_weapon" error
This commit is contained in:
@@ -9,6 +9,8 @@ if ((owner _victim) == (owner _attacker)) exitWith {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_weapon = weaponState _attacker;
|
_weapon = weaponState _attacker;
|
||||||
|
if (!isNil "_weapon") then {
|
||||||
|
if (count _weapon != 0) then {
|
||||||
if (_weapon select 0 == "Throw") then
|
if (_weapon select 0 == "Throw") then
|
||||||
{
|
{
|
||||||
_weapon = _weapon select 3;
|
_weapon = _weapon select 3;
|
||||||
@@ -17,6 +19,8 @@ else
|
|||||||
{
|
{
|
||||||
_weapon = _weapon select 0;
|
_weapon = _weapon select 0;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
_vehicle = typeOf (vehicle _attacker);
|
_vehicle = typeOf (vehicle _attacker);
|
||||||
if ((getText (configFile >> "CfgVehicles" >> _vehicle >> "vehicleClass")) in ["CarW","Car","CarD","Armored","Ship","Support","Air","ArmouredW","ArmouredD","SupportWoodland_ACR"]) then {
|
if ((getText (configFile >> "CfgVehicles" >> _vehicle >> "vehicleClass")) in ["CarW","Car","CarD","Armored","Ship","Support","Air","ArmouredW","ArmouredD","SupportWoodland_ACR"]) then {
|
||||||
|
|||||||
Reference in New Issue
Block a user