Merge pull request #866 from dayz10k/master

melee mags for skinchanges, actions after skinchanges
This commit is contained in:
HARLAN
2013-12-06 08:40:28 -08:00
5 changed files with 42 additions and 4 deletions

View File

@@ -90,6 +90,13 @@ player allowDamage true;
player addWeapon "Loot";
player addWeapon "Flare";
//melee check
_wpnType = primaryWeapon player;
_ismelee = (gettext (configFile >> "CfgWeapons" >> _wpnType >> "melee"));
if (_ismelee == "true") then {
call dayz_meleeMagazineCheck;
};
sleep 0.1;
if (!isNull _old) then {

View File

@@ -208,4 +208,15 @@ diag_log str(getMagazineCargo unitBackpack _newUnit);
_playerUID=getPlayerUID player;
_playerObjName = format["player%1",_playerUID];
call compile format["%1 = player;",_playerObjName];
publicVariable _playerObjName;
publicVariable _playerObjName;
//melee check
_wpnType = primaryWeapon player;
_ismelee = (gettext (configFile >> "CfgWeapons" >> _wpnType >> "melee"));
if (_ismelee == "true") then {
call dayz_meleeMagazineCheck;
};
//reveal all near objects.
{player reveal _x} forEach (nearestObjects [getPosATL player, ["All"], 75]);
//All is arbitrary and will need to be changed to ["AllVehicles","WeaponHolder","tentStorage"] ++ others (stashes etc.)