Update fnc_plyrHit.sqf

Fixed undefined variable "_weapon" error on 1.63.112555+
This commit is contained in:
ebaydayz
2014-07-13 12:18:38 -04:00
parent a487fd4f78
commit 0eb5f76c64

View File

@@ -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 {